CVE-2025-30370 Details
Description
jupyterlab-git is a JupyterLab extension for version control using Git. On many platforms, a third party can create a Git repository under a name that includes a shell command substitution string in the syntax $(<command>). These directory names are allowed in macOS and a majority of Linux distributions. If a user starts jupyter-lab in a parent directory of this inappropriately-named Git repository, opens it, and clicks "Git > Open Git Repository in Terminal" from the menu bar, then the injected command <command> is run in the user's shell without the user's permission. This issue is occurring because when that menu entry is clicked, jupyterlab-git opens the terminal and runs cd <git-repo-path> through the shell to set the current directory. Doing so runs any command substitution strings present in the directory name, which leads to the command injection issue described here. A previous patch provided an incomplete fix. This vulnerability is fixed in 0.51.1.
A command injection vulnerability has been identified in the JupyterLab Git extension, jupyterlab-git, versions through 0.51.0. The issue arises when a Git repository is created with a name that includes a shell command substitution string. If a user opens JupyterLab in a directory containing this repository and selects 'Open Git Repository in Terminal' from the menu, the injected command is executed in the user's shell without permission. This vulnerability allows for arbitrary code execution, with potential consequences such as modifying files, exfiltrating data, halting services, or compromising server security.
Users are advised to upgrade to jupyterlab-git version 0.51.1 or later, where this vulnerability has been patched. If an upgrade is not possible, terminals can be disabled at the jupyter-server level or by disabling the terminals server extension or the JupyterLab terminal extension.
Metrics
CVSS 4.0 Severity and Vector Strings:
CVSS 3.x Severity and Vector Strings:
No data available for CVSS Version 2.0 on this CVE.
Volerion
Assessed Apr 3, 2025CISA-ADP
Assessed Apr 4, 2025References to Advisories, Solutions, and Tools
By selecting these links, you will be leaving this site. These are references gathered from the official CVE record and are not endorsed by Volerion.
| URL | Source(s) | Tag(s) |
|---|---|---|
| https://github.com/jupyterlab/jupyterlab-git/security/advisories/GHSA-cj5w-8mjf-r5f8 | CISA-ADP | AdvisoryExploitRemedyVendor |
| https://github.com/jupyterlab/jupyterlab-git/blob/7eb3b06f0092223bd5494688ec264527bbeb2195/src/commandsAndMenu.tsx#L175-L184 | [email protected] | Source CodeVendor |
| https://github.com/jupyterlab/jupyterlab-git/commit/b46482993f76d3a546015c6a94ebed8b77fc2376 | [email protected] | Source CodeVendor |
| https://github.com/jupyterlab/jupyterlab-git/pull/1196 | [email protected] | Issue TrackingTechnical DescriptionVendor |
| https://github.com/jupyterlab/jupyterlab-git/security/advisories/GHSA-cj5w-8mjf-r5f8 | [email protected] | AdvisoryExploitRemedyVendor |
Weakness Enumeration
| CWE-ID | CWE Name | Source |
|---|---|---|
| CWE-78 | Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') | [email protected] |
Affected Products
| Product | Versions |
|---|---|
| jupyterlab-git | All versions |
CPE
Remediation
| |
Change History
4 change records found show changes
| Date | Action | Recorded By |
|---|---|---|
| Jun 17, 2026 | CVE Modified | [email protected] |
| Jun 17, 2026 | CVE Modified | CISA-ADP |
| Apr 4, 2025 | CVE Modified | CISA-ADP |
| Apr 3, 2025 | New CVE Received | [email protected] |
Volerion