Vulnerabilities in pkg:pypi/jupyterlab-git-core

PACKAGE
Advisory Identifier: GHSA-f962-v9hr-pfg5
Advisory Summary

CVE-2026-54527 is a HIGH (CVSS 9.0) remote code execution vulnerability (CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')) affecting jupyterlab-git extension libraries in the PyPI ecosystem. The issue involves stored xss leading to rce. Remediation is available by upgrading affected packages to version 0.54.0.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:pypi/jupyterlab-git-core

1 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:pypi/jupyterlab-git-core. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-f962-v9hr-pfg5 CVE-2026-54527 HIGH jupyterlab-git extension: Stored XSS leading to RCE

CVE-2026-54527 at a Glance

CVE Identifier CVE-2026-54527
GHSA Identifier GHSA-f962-v9hr-pfg5
Severity HIGH
CVSS v3.1 Base Score 9.0
CWE Classification CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting')
Affected Product jupyterlab-git extension
Package Ecosystem PyPI
Published Date
Last Updated

Security Impact

CVSS: 9.0

The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H).

Attack Vector Network (AV:N)
Attack Complexity Low (AC:L)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality High (C:H)
Integrity High (I:H)
Availability High (A:H)

How to Fix CVE-2026-54527

To remediate this vulnerability, upgrade all affected jupyterlab-git extension dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

jupyterlab-git fixed: 0.54.0
pip install jupyterlab-git>=0.54.0
jupyterlab-git-core fixed: 0.54.0
pip install jupyterlab-git-core>=0.54.0
@jupyterlab/git fixed: 0.54.0
npm install @jupyterlab/git@0.54.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show jupyterlab-git

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-54527, inspect your installed packages using pip:

pip show jupyterlab-git

Analyze the terminal output to locate any version of jupyterlab-git extension in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 0.54.0), your application is affected.

Note: The pip show jupyterlab-git command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting'), where 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. In jupyterlab-git extension, 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

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.

CVE-2026-54527 Affected jupyterlab-git extension Versions

3 component(s)
Fixed Versions:
0.54.0
Product / Package Ecosystem Affected Versions Fixed Version
jupyterlab-git
PyPI
≥ 0.30.0b3
< 0.54.0
0.54.0
jupyterlab-git-core
PyPI
≥ 0.30.0b3
< 0.54.0
0.54.0
@jupyterlab/git
npm
≥ 0.30.0-beta.3
< 0.54.0
0.54.0

References

Frequently Asked Questions

What is CVE-2026-54527?
CVE-2026-54527 is a security vulnerability in jupyterlab-git extension involving Stored XSS leading to RCE under CWE-79: Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting').
Which jupyterlab-git extension versions are affected?
Affected versions include releases prior to 0.54.0 across affected packages: jupyterlab-git, jupyterlab-git-core, @jupyterlab/git.
What version fixes CVE-2026-54527?
Upgrading to 0.54.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is jupyterlab-git affected?
Yes, jupyterlab-git is affected in releases prior to 0.54.0. Upgrade your dependency to 0.54.0 or later.
Is jupyterlab-git-core affected?
Yes, jupyterlab-git-core is affected in releases prior to 0.54.0. Upgrade your dependency to 0.54.0 or later.
What is the CVSS score of CVE-2026-54527?
CVE-2026-54527 has a CVSS v3.1 base score of 9.0 (HIGH) with vector string CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H.
What CWE is associated with CVE-2026-54527?
CVE-2026-54527 is classified under 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.).
How can I check PyPI dependencies for CVE-2026-54527?
Run the dependency tree command: 'pip show jupyterlab-git'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-f962-v9hr-pfg5",
  "modified" : "2026-09-04T21:16:43Z",
  "published" : "2026-06-19T19:36:04Z",
  "aliases" : [ "CVE-2026-54527" ],
  "summary" : "jupyterlab-git extension: Stored XSS leading to RCE",
  "details" : "Overview\n\nAmazon 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.\n\nThe 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.\n\n\n\nScope of impact\n\nWe discovered this issue during internal security testing. The issue is present in the default configuration of JupyterLab when the jupyterlab-git extension is installed.\n\nThe attack requires:\n\n- The adversary to have commit access to a Git repository that the victim has cloned\n\n- The victim to navigate to the Git History tab, click the rename commit, and click the renamed file to view the diff\n\n\n\nThe 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.\n\n\n\nProof of concept\n\nThe issue exists in the createHeader() method where filenames from rename history are passed directly to innerHTML without sanitization:\n\n[1] https://github.com/jupyterlab/jupyterlab-git/blob/main/src/components/diff/PlainTextDiff.ts#L214\n\n\n\nAttack flow:\n\n1. An adversary creates a file with a crafted filename containing a JavaScript payload, e.g., <img src=x onerror=eval(atob(\"base64_payload\"))>.py\n\n2. The adversary renames the file in a subsequent commit and pushes both commits to a shared Git repository\n\n3. The victim clones or pulls the repository and navigates to the Git History tab in JupyterLab\n\n4. The victim clicks the rename commit, then clicks the renamed file to view the diff\n\n5. The createHeader() method constructs a diff header using string concatenation with the unsanitized filename and assigns the result to innerHTML\n\n6. 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\n\n\n\nProof-of-concept mitigation\n\nThe 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.",
  "severity" : [ {
    "type" : "CVSS_V3",
    "score" : "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:H/I:H/A:H"
  }, {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:P/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "jupyterlab-git"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.30.0b3"
      }, {
        "fixed" : "0.54.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 0.54.0a1"
    }
  }, {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "jupyterlab-git-core"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.30.0b3"
      }, {
        "fixed" : "0.54.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 0.54.0a1"
    }
  }, {
    "package" : {
      "ecosystem" : "npm",
      "name" : "@jupyterlab/git"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0.30.0-beta.3"
      }, {
        "fixed" : "0.54.0"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "< 0.54.0-a1"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/jupyterlab/jupyterlab-git/security/advisories/GHSA-f962-v9hr-pfg5"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-54527"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jupyterlab/jupyterlab-git/commit/c6d37b88f36aa59aee317930b95e427fb9d6b09b"
  }, {
    "type" : "ADVISORY",
    "url" : "https://github.com/advisories/GHSA-f962-v9hr-pfg5"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/jupyterlab/jupyterlab-git"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/jupyterlab/jupyterlab-git/releases/tag/v0.54.0"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/jupyterlab-git-core/PYSEC-2026-2541.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/pypa/advisory-database/tree/main/vulns/jupyterlab-git/PYSEC-2026-2540.yaml"
  }, {
    "type" : "WEB",
    "url" : "https://pypi.org/project/jupyterlab-git"
  }, {
    "type" : "WEB",
    "url" : "https://pypi.org/project/jupyterlab-git-core"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-79" ],
    "severity" : "HIGH",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-06-19T19:36:04Z",
    "nvd_published_at" : "2026-07-08T21:16:49Z"
  }
}