JupyterLab: Stored XSS in extension manager through package metadata unsanitized URI protocol
A malicious PyPI package can place a javascript: URL in its [project.urls] metadata. JupyterLab's Extension Manager renders this as the extension's home-page link without validating the protocol, so a user who clicks the extension name executes attacker-controlled JavaScript in the JupyterLab origin.
Details
One of the PyPI package's URL (jupyterlab/extensions/pypi.py) is copied straight into the homepage_url rendered by the frontend in packages/extensionmanager/src/widget.tsx#L77-L88.
best_guess_home_url = (
homepage_url # home_page / [project.urls] Homepage
or data.get("project_url")
or data.get("package_url")
or documentation_url # docs_url / [project.urls] Documentation
or source_url # [project.urls] Source Code
or bug_tracker_url # bugtrack_url / [project.urls] Bug Tracker
)
# homepage_url=best_guess_home_url
{entry.homepage_url ? (
<a href={entry.homepage_url} target="_blank" rel="noopener noreferrer" ...>
{entry.name}
</a>
) : ( <div>{entry.name}</div> )}
Impact
An attacker needs to publish a package to PyPI (no access to the target). When the package appears in a victim's extension manager list and the victim clicks the extension name, the payload runs in the JupyterLab origin.
Preconditions: Extension Manager enabled with the default PyPI source, the malicious package appears in the victim's list/search results.
Patches
Affected software
Click a technology to see all vulnerabilities affecting it.
| Platform | Package | Vulnerable versions | Fixed in |
|---|---|---|---|
| Python (PyPI) | jupyterlab | < 4.5.9 | 4.5.9 |
References
- https://github.com/jupyterlab/jupyterlab/security/advisories/GHSA-vmhf-c436-hxj4
- https://github.com/jupyterlab/jupyterlab/commit/4e61e07d0a91145b53fbf96ac74b0387f6bc51f6
- https://github.com/jupyterlab/jupyterlab/commit/d5d961f6e10a6442dddbf94d9a976b3897055a12
- https://github.com/jupyterlab/jupyterlab
- https://github.com/jupyterlab/jupyterlab/releases/tag/v4.5.9
- CVSS vector
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:A/VC:N/VI:N/VA:N/SC:L/SI:L/SA:N- Weakness (CWE)
CWE-84- Platform
- Python (PyPI)
- Package
jupyterlab- Disclosed
- 19.06.2026
- Updated
- 14.10.2026 14:17
Sources and licenses
OSV / GitHub Advisory Database - GHSA-vmhf-c436-hxj4 - CC BY 4.0
Vulnerability history: jupyterlab
All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.
- Total entries
- 19
- First → latest
- 08.2021 10.2026
- Without a fix
- 0
- Exploited in attacks
- 0
Severity breakdown
- Critical 1
- High 8
- Medium 8
- Low 2
Disclosures per year
- 2021: 1
- 2022: 0
- 2023: 0
- 2024: 4
- 2025: 1
- 2026: 13
-
JupyterLab: Stored XSS in extension manager through package metadata unsanitized URI protocol this entry
Know which vulnerabilities affect your application
With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.