Skip to main content
EPSS 0.5%top 57%

CVE-2026-54527: CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in jupyterlab jupyterlab-git

0
Critical
Published: 07/08/2026 (07/08/2026, 21:03:01 UTC)
Source: CVE Database V5
Vendor/Project: jupyterlab
Product: jupyterlab-git

Description

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.

CVSS v4.0

Score 9.3critical

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
Low
User Interaction
Active
Vuln. Confidentiality
High
Vuln. Integrity
High
Vuln. Availability
High
Subsq. Confidentiality
High
Subsq. Integrity
High
Subsq. Availability
High
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:A/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H

Affected software

jupyterlab

jupyterlab-git

Affected versions
>=0.30.0b3 <0.54.0
jupyterlab-git
pkg:npm/jupyterlab-git
Affected versions
<0.54.0

Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.

AI-Powered Analysis

Machine-generated threat intelligence

AILast updated: 07/16/2026, 10:11:07 UTC

Technical Analysis

CVE-2026-54527 is a CWE-79 (Improper Neutralization of Input During Web Page Generation) vulnerability affecting jupyterlab-git, a Git extension for JupyterLab. Specifically, in versions from 0.30.0b3 up to but not including 0.54.0, the createHeader() method in PlainTextDiff.ts inserts Git filenames directly into innerHTML without sanitization when rendering renamed files in the commit history. This improper handling allows an attacker to execute arbitrary JavaScript code when a user views the rename diff in the Git History tab. The vulnerability has a CVSS 4.0 base score of 9.3, indicating critical severity. The issue is resolved in version 0.54.0.

Potential Impact

An attacker can exploit this vulnerability by crafting a malicious Git filename that, when viewed in the Git History tab of jupyterlab-git, executes arbitrary JavaScript code in the context of the victim's browser. This can lead to actions such as session hijacking, data theft, or other malicious behaviors depending on the victim's privileges and environment. The vulnerability requires user interaction (viewing the rename diff) and low attack complexity, with no privileges required but user interaction needed. The impact on confidentiality, integrity, and availability is high.

Mitigation Recommendations

This vulnerability is fixed in jupyterlab-git version 0.54.0. Users and administrators should upgrade to version 0.54.0 or later to remediate this issue. No other official remediation or temporary fixes are documented. Until upgrading, avoid viewing rename diffs from untrusted repositories or filenames.

Pro Console: star threats, build custom feeds, automate alerts via Slack, email & webhooks.Upgrade to Pro

Technical Details

Data Version
5.2
Assigner Short Name
GitHub_M
Date Reserved
2026-06-15T18:40:01.651Z
Cvss Version
4.0
State
PUBLISHED

Threat ID: 6a4ebdf5c9d9e3dbe3bf8b00

Added to database: 07/08/2026, 21:15:33 UTC

Last enriched: 07/16/2026, 10:11:07 UTC

Last updated: 10/07/2026, 18:48:21 UTC

Views: 269

Community Reviews

0 reviews

Crowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.

Sort by
Loading community insights…

Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.

Actions

PRO

Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.

Please log in to the Console to use AI analysis features.

Need more coverage?

Upgrade to Pro Console for AI refresh and higher limits.

For incident response and remediation, OffSeq services can help resolve threats faster.

Latest Threats

Breach by OffSeqOFFSEQFRIENDS — 25% OFF

Check if your credentials are on the dark web

Instant breach scanning across billions of leaked records. Free tier available.

Scan now
OffSeq TrainingCredly Certified

Lead Pen Test Professional

Technical5-day eLearningPECB Accredited
View courses