{"answers":{"affected":"2 open source packages ship an affected version, including @npmcli/git.","exploited":"There is no known exploitation of GHSA-hxwm-x553-x359 in the wild and no public exploit code.","fix":"Upgrade @npmcli/git to 2.0.8 or later.","what":"GHSA-hxwm-x553-x359 is a command injection vulnerability in @npmcli/git, published on 5 Aug 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link."},"fix_prompt":"Check this codebase for GHSA-hxwm-x553-x359 and fix it if it is affected.\n\nWhat it is: GHSA-hxwm-x553-x359 is a command injection vulnerability in @npmcli/git, published on 5 Aug 2021. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.\nExploitation: There is no known exploitation of GHSA-hxwm-x553-x359 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- @npmcli/git (npm): affected all versions; fixed in 2.0.8\n- @npmcli/git (npm): affected all versions; fixed in 2.0.8\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/GHSA-hxwm-x553-x359/ (Markdown: https://insights.sbomify.com/GHSA-hxwm-x553-x359/index.md)","id":"GHSA-hxwm-x553-x359","markdown":"https://insights.sbomify.com/GHSA-hxwm-x553-x359/index.md","name":"GHSA-hxwm-x553-x359","record":{"aliases":[],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"npm git library","requires_auth":"none","summary":"Attackers can execute arbitrary shell commands via unsanitized Git arguments in the npmcli/git library, requiring user interaction to trigger.","user_interaction":"required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"### Summary\nThere exists a command injection vulnerability in `npmcli/git` versions \u003c2.0.8 which may result in arbitrary shell command execution due to improper argument sanitization when `npmcli/git` is used to execute Git commands based on user controlled input. \n\nThe impact of this issue is possible Arbitrary Command Injection when `npmcli/git` is run with untrusted (user controlled) Git command arguments. \n\n### Impact\n\nArbitrary Command Injection\n\n### Details\n\n`npmcli/git` prior to release `2.0.8` passed user controlled input as arguments to a shell command without properly sanitizing this input. Passing unsanitized input to a shell can lead to arbitrary command injection. For example passing `git+https://github.com/npm/git; echo hello world` would trigger the shell execution of `echo hello world`.  \n\nThis issue was remediated by no longer running `npmcli/git` git commands through an intermediate shell.\n\n### Patches\n\nThis issue has been patched in release `2.0.8`\n\n### Acknowledgements\n\nThis report was reported to us by @tyage (Ierae Security) through the [GitHub Bug Bounty Program](https://bounty.github.com).","ecosystems":["npm"],"exploits":{"exploitdb":null,"first_seen":null,"github_poc":null,"max_poc_stars":null,"metasploit":null,"nuclei":null,"refs":[],"tier":null},"has_fix":true,"headline":"Arbitrary Command Injection due to Improper Command Sanitization","id":"GHSA-hxwm-x553-x359","indexable":true,"kev":null,"kind":"advisory","links":{"ecosystem":"npm","product":null,"products":[],"type":"command_injection","year":"2021"},"n_packages":2,"n_references":null,"packages":[{"ecosystem":"npm","fixed":["2.0.8"],"introduced":["0"],"last_affected":[],"package":"@npmcli/git","purl":null,"source":"GHSA-hxwm-x553-x359"},{"ecosystem":"npm","fixed":["2.0.8"],"introduced":["0"],"last_affected":[],"package":"@npmcli/git","purl":"pkg:npm/%40npmcli/git","source":"GHSA-hxwm-x553-x359"}],"products":null,"published":"2021-08-05","related":[],"sources":[{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":null,"updated":null,"vendors":null},"summary":"Attackers can execute arbitrary shell commands via unsanitized Git arguments in the npmcli/git library, requiring user interaction to trigger.","url":"https://insights.sbomify.com/GHSA-hxwm-x553-x359/"}