{"id":"CVE-2025-30370","published":"2025-04-03T22:00:44Z","modified":"2025-04-04T18:54:20Z","title":"jupyterlab-git has a command injection vulnerability in \"Open Git Repository in Terminal\"","vendor":"jupyterlab","product":"jupyterlab-git","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.4,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00597,"percentile":0.49466,"provenance":"source"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"references":[{"url":"https://github.com/jupyterlab/jupyterlab-git/security/advisories/GHSA-cj5w-8mjf-r5f8","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/jupyterlab/jupyterlab-git/pull/1196","tags":["x_refsource_MISC"]},{"url":"https://github.com/jupyterlab/jupyterlab-git/commit/b46482993f76d3a546015c6a94ebed8b77fc2376","tags":["x_refsource_MISC"]},{"url":"https://github.com/jupyterlab/jupyterlab-git/blob/7eb3b06f0092223bd5494688ec264527bbeb2195/src/commandsAndMenu.tsx#L175-L184","tags":["x_refsource_MISC"]}],"priority":{"score":15.1,"factors":[{"name":"EPSS percentile","points":9.89},{"name":"CVSS severity","points":5.18}]},"vendorSlug":"jupyterlab","affectedVersions":[{"vendor":"jupyterlab","product":"jupyterlab-git","versions":["< 0.51.1"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"partial","timestamp":"2025-04-04T18:35:51.588736Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"jupyterlab-git","vulnerableRanges":["<0.51.1"],"patched":["0.51.1"],"from":["GHSA-cj5w-8mjf-r5f8","PYSEC-2026-1483"],"provenance":"source"}],"summary":{"text":"The jupyterlab-git extension for JupyterLab contains an OS command injection flaw in its \"Open Git Repository in Terminal\" menu action, which runs a cd command through the shell without neutralizing command substitution syntax in the repository directory name. An attacker who can create a Git repository with a name containing a $(<command>) string in a directory the user opens from a parent directory of JupyterLab can have that command executed in the user's shell, provided the user is local to the environment, has low privileges, and clicks the menu entry.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:32:18Z"},"euvd":{"id":"EUVD-2025-9739","exploited":false,"provenance":"source"}}