JupyterLab: Stored XSS in extension manager through package metadata unsanitized URI protocol
MediumCVE-2026-67338 · Published Jun 19, 2026 · updated Sep 10, 2026
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. ```python 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 ``` ```tsx {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 victi...
Affected versions
| Package | Affected | Fixed in |
|---|---|---|
| jupyterlab PyPI | < 4.5.9 | 4.5.9 |
Details and references
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. ```python 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 ``` ```tsx {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 Patched in [4.5.9](https://github.com/jupyterlab/jupyterlab/releases/tag/v4.5.9), commits [4e61e07](https://github.com/jupyterlab/jupyterlab/commit/4e61e07d0a91145b53fbf96ac74b0387f6bc51f6) and [d5d961f](https://github.com/jupyterlab/jupyterlab/commit/d5d961f6e10a6442dddbf94d9a976b3897055a12)
- CVSS 4.0
- 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
- Severity from
- GitHub (reviewed advisory)
- Weakness
- CWE-84
- Also known as
- CVE-2026-67338
- github.com/jupyterlab/jupyterlab/security/advisories/GHSA-vmhf-c436-hxj4
- github.com/jupyterlab/jupyterlab/commit/4e61e07d0a91145b53fbf96ac74b0387f6bc51f6
- github.com/jupyterlab/jupyterlab/commit/d5d961f6e10a6442dddbf94d9a976b3897055a12
- github.com/jupyterlab/jupyterlab
- github.com/jupyterlab/jupyterlab/releases/tag/v4.5.9
More Jupyter advisories
All Jupyter| Date | Advisory | Severity | Fixed in |
|---|---|---|---|
| Jul 22 | JupyterLab: Image viewer allows XSS when opening malicious image in new browser tab | High | 4.5.10+1 more |
| Jul 22 | JupyterLab: PyPI extension blocklist package-name canonicalization bypass | Medium | 4.5.10+1 more |
| Jul 22 | JupyterLab PluginManager lock-rule enforcement bypass | Medium | 4.5.10+1 more |
| Jul 22 | Jupyter: improper access control | Low0.0 | 4.5.10+1 more |
| Jul 13 | Jupyter Server vulnerable to Path Traversal via incorrect root directory boundary check in _get_os_path() | Medium6.8 | 2.18.2 |
| Jun 18 | Jupyter Server: Stored XSS in `NbconvertFileHandler` / `NbconvertPostHandler` via missing `sandbox` CSP | Critical5.4 | 2.20.0 |