{"answers":{"affected":"3 open source packages ship an affected version, including jupyterlab-git.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-30370 exists.","fix":"Upgrade jupyterlab-git to 0.51.1 or later.","what":"CVE-2025-30370 is a high-severity command injection vulnerability in jupyterlab-git, published on 3 Apr 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for CVE-2025-30370 and fix it if it is affected.\n\nWhat it is: CVE-2025-30370 is a high-severity command injection vulnerability in jupyterlab-git, published on 3 Apr 2025. It can only be exploited from the same machine or local network, and only if a user opens a file or follows a link.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2025-30370 exists.\n\nAffected packages and fixed versions:\n- jupyterlab-git (PyPI): affected all versions; fixed in 0.51.1\n- jupyterlab-git (PyPI): affected all versions; fixed in 0.51.1\n- jupyterlab-git (PyPI): affected all versions; fixed in 0.51.1\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2025-30370/ (Markdown: https://insights.sbomify.com/CVE-2025-30370/index.md)","id":"CVE-2025-30370","markdown":"https://insights.sbomify.com/CVE-2025-30370/index.md","name":"CVE-2025-30370","record":{"aliases":["GHSA-cj5w-8mjf-r5f8","PYSEC-2026-1483"],"analysis":{"component_type":"developer_tool","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"adjacent_or_local","non_default_config":false,"product_category":"JupyterLab Git extension","requires_auth":"low_privilege","summary":"Attackers can execute arbitrary shell commands by tricking users into opening a maliciously named Git repository in the terminal via the JupyterLab Git extension.","user_interaction":"required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[],"cvss":{"score":7.4,"severity":"high","source":"cna","vector":"CVSS:3.1/AV:L/AC:H/PR:L/UI:R/S:C/C:L/I:H/A:H","version":"3.1"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"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 $(\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.","ecosystems":["PyPI"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"jupyterlab-git has a command injection vulnerability in \"Open Git Repository in Terminal\"","id":"CVE-2025-30370","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"PyPI","product":null,"products":[],"type":"command_injection","year":"2025"},"n_packages":3,"n_references":4,"next":{"headline":"Metabase vulnerable to circumvention of local link access protection in GeoJson endpoint","id":"CVE-2025-30371"},"packages":[{"ecosystem":"PyPI","fixed":["0.51.1"],"introduced":["0"],"last_affected":[],"package":"jupyterlab-git","purl":null,"source":"GHSA-cj5w-8mjf-r5f8"},{"ecosystem":"PyPI","fixed":["0.51.1"],"introduced":["0"],"last_affected":[],"package":"jupyterlab-git","purl":"pkg:pypi/jupyterlab-git","source":"GHSA-cj5w-8mjf-r5f8"},{"ecosystem":"PyPI","fixed":["0.51.1"],"introduced":["0"],"last_affected":[],"package":"jupyterlab-git","purl":"pkg:pypi/jupyterlab-git","source":"PYSEC-2026-1483"}],"prev":{"headline":"Zulip allows the deletion of Custom profile fields by administrators of a different organization","id":"CVE-2025-30369"},"products":["jupyterlab-git"],"published":"2025-04-03","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"PyPA Advisory Database","prefix":"PYSEC"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"no","exploitation":"poc","technical_impact":"partial"},"state":"PUBLISHED","updated":"2025-04-04","vendors":["jupyterlab"]},"summary":"Attackers can execute arbitrary shell commands by tricking users into opening a maliciously named Git repository in the terminal via the JupyterLab Git extension.","url":"https://insights.sbomify.com/CVE-2025-30370/"}