CVE-2026-54527 — Vulnerability in jupyterlab-git-core — CVE Details
jupyterlab-git extension: Stored XSS leading to RCE
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.53%). Schedule for your next planned update.
Does your project use an affected jupyterlab-git-core version?
Paste your requirements.txt to check it for CVE-2026-54527 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
Overview
Amazon Web Services (AWS) Security has identified a stored cross-site scripting (XSS) issue in the jupyterlab-git JupyterLab extension that can lead to remote code execution (RCE). The issue exists in the PlainTextDiff.ts component, where the createHeader() method passes Git filenames directly to innerHTML without sanitization when rendering diffs for renamed files in commit history. This allows an adversary to craft a filename containing arbitrary HTML/JavaScript that executes when another user views the rename diff in the Git History tab.
The issue can be leveraged through the rename history view in the JupyterLab Git panel. An adversary creates a file with a crafted filename containing a JavaScript payload (e.g., <img src=x onerror=eval(atob("base64_payload"))>.py), renames the file in a subsequent commit, and pushes to a shared repository. When a victim clones the repository, navigates to the Git History tab, clicks the rename commit, and then clicks the renamed file to view the diff, the unsanitized filename renders via innerHTML, executing arbitrary JavaScript in the victim's browser session. The injected JavaScript reads the xsrf cookie, opens a JupyterLab terminal via POST /api/terminals, connects via WebSocket, and executes arbitrary shell commands — achieving full RCE. An adversary can leverage this to exfiltrate secrets or credentials from the victim's environment.
Scope of impact
We discovered this issue during internal security testing. The issue is present in the default configuration of JupyterLab when the jupyterlab-git extension is installed.
The attack requires:
-
The adversary to have commit access to a Git repository that the victim has cloned
-
The victim to navigate to the Git History tab, click the rename commit, and click the renamed file to view the diff
The issue could allow an actor who has access to a shared Git repository to execute arbitrary JavaScript in another user's JupyterLab environment by committing a file with a crafted filename, potentially leading to remote code execution with access to user code, data, environment variables, and credentials.
Proof of concept
The issue exists in the createHeader() method where filenames from rename history are passed directly to innerHTML without sanitization:
[1] https://github.com/jupyterlab/jupyterlab-git/blob/main/src/components/diff/PlainTextDiff.ts#L214
Attack flow:
-
An adversary creates a file with a crafted filename containing a JavaScript payload, e.g., <img src=x onerror=eval(atob("base64_payload"))>.py
-
The adversary renames the file in a subsequent commit and pushes both commits to a shared Git repository
-
The victim clones or pulls the repository and navigates to the Git History tab in JupyterLab
-
The victim clicks the rename commit, then clicks the renamed file to view the diff
-
The createHeader() method constructs a diff header using string concatenation with the unsanitized filename and assigns the result to innerHTML
-
The injected JavaScript executes in the victim's browser session, reads the _xsrf cookie, sends a POST request to /api/terminals to open a JupyterLab terminal, connects via WebSocket, and executes arbitrary shell commands
Proof-of-concept mitigation
The issue can be mitigated by replacing innerHTML with textContent for filename rendering in the createHeader() method of PlainTextDiff.ts. Alternatively, proper HTML sanitization (escaping <, >, &, ", ') can be applied before inserting user-controlled filenames into the DOM.
Advisory Timeline
- First published June 19, 2026 (160 days ago).
- Last revised September 4, 2026 — 77 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
pip install "jupyterlab-git-core>=0.54.0"
pip install "jupyterlab-git>=0.54.0"
npm install @jupyterlab/git@0.54.0
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (3)
Affects 2 ecosystems: PyPI (2), npm (1).
| Package | Fixed In |
|---|---|
| jupyterlab-git-core PyPI · Affected: 0.53.0, 0.53.0a1, 0.54.0a0, 0.54.0a1 | 0.54.0 |
| jupyterlab-git PyPI · Affected: 0.30.0, 0.30.0b3, 0.30.1, 0.31.0 (+44 more) | 0.54.0 |
| @jupyterlab/git npm · Affected: All versions | 0.54.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-79Cross-site Scripting (XSS)MITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.0 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H
References
- https://github.com/jupyterlab/jupyterlab-git/security/advisories/GHSA-f962-v9hr-pfg5WEB
- https://nvd.nist.gov/vuln/detail/CVE-2026-54527ADVISORY
- https://github.com/jupyterlab/jupyterlab-git/commit/c6d37b88f36aa59aee317930b95e427fb9d6b09bWEB
- https://github.com/advisories/GHSA-f962-v9hr-pfg5ADVISORY
- https://github.com/jupyterlab/jupyterlab-gitPACKAGE
- https://github.com/jupyterlab/jupyterlab-git/releases/tag/v0.54.0WEB
- https://github.com/pypa/advisory-database/tree/main/vulns/jupyterlab-git-core/PYSEC-2026-2541.yamlWEB
- https://github.com/pypa/advisory-database/tree/main/vulns/jupyterlab-git/PYSEC-2026-2540.yamlWEB
- https://pypi.org/project/jupyterlab-gitWEB
- https://pypi.org/project/jupyterlab-git-coreWEB
Frequently Asked Questions
- What is CVE-2026-54527?
- jupyterlab-git extension: Stored XSS leading to RCE. This vulnerability has been assigned a severity rating of HIGH (CVSS score: 9.0/10).
- How do I check if my project is affected by CVE-2026-54527?
- CVE-2026-54527 affects jupyterlab-git-core, jupyterlab-git and @jupyterlab/git. It has a 0.5% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2026-54527 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is a below-median EPSS score — only 38.1% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-128139HIGH
NLTK: XMLCorpusView comment and CDATA parsing permits quadratic CPU denial of service
- CVE-2026-129222HIGH
Natural Language Toolkit (NLTK): Uncontrolled recursion (crash DoS) in DependencyGraph.tree()/triples()