GHSA-vmhf-c436-hxj4: JupyterLab Cross-Site Scripting Vulnerability
MODERATEGHSA-vmhf-c436-hxj4 is a MODERATE cross-site scripting vulnerability (CWE-84: Improper Neutralization of Encoded URI Schemes in a Web Page) affecting JupyterLab libraries in the PyPI ecosystem. The issue involves stored xss in extension manager through package metadata unsanitized uri protocol. Remediation is available by upgrading affected packages to version 4.5.9.
GHSA-vmhf-c436-hxj4 at a Glance
How to Fix GHSA-vmhf-c436-hxj4
To remediate this vulnerability, upgrade all affected JupyterLab dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install jupyterlab>=4.5.9
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show jupyterlab
How to Check if You Are Affected
To determine whether your Python environment is affected by GHSA-vmhf-c436-hxj4, inspect your installed packages using pip:
pip show jupyterlab
Analyze the terminal output to locate any version of JupyterLab in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 4.5.9), your application is affected.
Note: The pip show jupyterlab command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-84: Improper Neutralization of Encoded URI Schemes in a Web Page, where the web application improperly neutralizes user-controlled input for executable script disguised with uri encodings. In JupyterLab, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-vmhf-c436-hxj4 Affected JupyterLab Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
jupyterlab
|
PyPI |
< 4.5.9
|
4.5.9
|
References
Frequently Asked Questions
What is GHSA-vmhf-c436-hxj4?
Which JupyterLab versions are affected?
What version fixes GHSA-vmhf-c436-hxj4?
Is jupyterlab affected?
What CWE is associated with GHSA-vmhf-c436-hxj4?
How can I check PyPI dependencies for GHSA-vmhf-c436-hxj4?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-vmhf-c436-hxj4",
"modified" : "2026-06-19T15:11:17Z",
"published" : "2026-06-19T15:11:17Z",
"aliases" : [ ],
"summary" : "JupyterLab: Stored XSS in extension manager through package metadata unsanitized URI protocol",
"details" : "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.\n\n### Details\n\nOne 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.\n\n```python\nbest_guess_home_url = (\n homepage_url # home_page / [project.urls] Homepage\n or data.get(\"project_url\")\n or data.get(\"package_url\")\n or documentation_url # docs_url / [project.urls] Documentation\n or source_url # [project.urls] Source Code\n or bug_tracker_url # bugtrack_url / [project.urls] Bug Tracker\n)\n\n# homepage_url=best_guess_home_url\n```\n\n```tsx\n{entry.homepage_url ? (\n <a href={entry.homepage_url} target=\"_blank\" rel=\"noopener noreferrer\" ...>\n {entry.name}\n </a>\n) : ( <div>{entry.name}</div> )}\n```\n\n### Impact\n\nAn 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.\n\nPreconditions: Extension Manager enabled with the default PyPI source, the malicious package appears in the victim's list/search results.\n\n### Patches\nPatched 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)",
"severity" : [ {
"type" : "CVSS_V4",
"score" : "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"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "jupyterlab"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.5.9"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 4.5.8"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/jupyterlab/jupyterlab/security/advisories/GHSA-vmhf-c436-hxj4"
}, {
"type" : "WEB",
"url" : "https://github.com/jupyterlab/jupyterlab/commit/4e61e07d0a91145b53fbf96ac74b0387f6bc51f6"
}, {
"type" : "WEB",
"url" : "https://github.com/jupyterlab/jupyterlab/commit/d5d961f6e10a6442dddbf94d9a976b3897055a12"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/jupyterlab/jupyterlab"
}, {
"type" : "WEB",
"url" : "https://github.com/jupyterlab/jupyterlab/releases/tag/v4.5.9"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-84" ],
"severity" : "MODERATE",
"github_reviewed" : true,
"github_reviewed_at" : "2026-06-19T15:11:17Z",
"nvd_published_at" : null
}
}