{"id":"CVE-2025-30370","summary":"jupyterlab-git has a command injection vulnerability in \"Open Git Repository in Terminal\"","details":"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 $(\u003ccommand\u003e). 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 \u003e Open Git Repository in Terminal\" from the menu bar, then the injected command \u003ccommand\u003e 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 \u003cgit-repo-path\u003e 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.","aliases":["GHSA-cj5w-8mjf-r5f8","PYSEC-2026-1483"],"modified":"2026-08-12T03:51:22.380527503Z","published":"2025-04-03T22:00:44.476Z","database_specific":{"cna_assigner":"GitHub_M","cwe_ids":["CWE-78"],"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/30xxx/CVE-2025-30370.json"},"references":[{"type":"WEB","url":"https://github.com/jupyterlab/jupyterlab-git/blob/7eb3b06f0092223bd5494688ec264527bbeb2195/src/commandsAndMenu.tsx#L175-L184"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/30xxx/CVE-2025-30370.json"},{"type":"ADVISORY","url":"https://github.com/jupyterlab/jupyterlab-git/security/advisories/GHSA-cj5w-8mjf-r5f8"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-30370"},{"type":"FIX","url":"https://github.com/jupyterlab/jupyterlab-git/commit/b46482993f76d3a546015c6a94ebed8b77fc2376"},{"type":"FIX","url":"https://github.com/jupyterlab/jupyterlab-git/pull/1196"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/jupyterlab/jupyterlab-git","events":[{"introduced":"0"},{"fixed":"b46482993f76d3a546015c6a94ebed8b77fc2376"}],"database_specific":{"source":["AFFECTED_FIELD","REFERENCES"],"extracted_events":[{"introduced":"0"},{"fixed":"0.51.1"}]}}],"versions":["v0.51.0","v0.50.2","v0.50.1","v0.50.0","v0.50.0rc0","v0.44.0","v0.50.0a2","v0.50.0a1","v0.50.0a0","v0.43.0","v0.42.0","v0.42.0rc0","v0.41.0","v0.40.1","v0.40.0","v0.39.3.post1","v0.39.3","v0.39.2","v0.39.1","v0.39.0","v0.38.0","v0.37.1","v0.37.0","v0.36.0","v0.35.0","v0.34.2","v0.34.1","v0.34.0","v0.33.0","v0.32.2","v0.32.1","v0.32.0","v0.31.0","v0.31.0a0","v0.30.1","v0.30.0","v0.30.0b3","v0.30.0b2","v0.30.0b1.post1","v0.30.0b1","v0.23.3","v0.23.2","v0.23.1","v0.23.0","v0.22.3","v0.22.2","v0.22.1","v0.22.0","v0.21.1","v0.21.0","v0.21.0rc0","v0.21.0a1","v0.21.0a0","v0.9.0rc1","v0.9.0","v0.8.2","v0.8.1","v0.8","v0.7.1","v0.6.1-alpha.0","v0.6.1","v0.6.0","v0.5.0","v0.4.4","v0.4.2","v0.4.1","v0.4.0","v0.3.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-30370.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:H/A:H"}]}