{"answers":{"affected":"2 open source packages ship an affected version, including shell-quote.","exploited":"There is no known exploitation of CVE-2026-9277 in the wild and no public exploit code.","fix":"Upgrade shell-quote to 1.8.4 or later.","what":"CVE-2026-9277 is a critical command injection vulnerability in shell-quote, published on 22 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2026-9277 and fix it if it is affected.\n\nWhat it is: CVE-2026-9277 is a critical command injection vulnerability in shell-quote, published on 22 May 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: There is no known exploitation of CVE-2026-9277 in the wild and no public exploit code.\n\nAffected packages and fixed versions:\n- shell-quote (npm): affected from 1.1.0; fixed in 1.8.4\n- shell-quote (npm): affected from 1.1.0; fixed in 1.8.4\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-2026-9277/ (Markdown: https://insights.sbomify.com/CVE-2026-9277/index.md)","id":"CVE-2026-9277","markdown":"https://insights.sbomify.com/CVE-2026-9277/index.md","name":"CVE-2026-9277","record":{"aliases":["CLEANSTART-2026-GD45765","CLEANSTART-2026-GJ43492","CLEANSTART-2026-JC29454","CLSA-2026-1783558964","CLSA-2026-1791359284","DEBIAN-CVE-2026-9277","ECHO-9c06-21c4-eee8","GHSA-w7jw-789q-3m8p","MINI-2x58-rc8x-33wh","MINI-9q99-vmjw-hjxw","MINI-c98h-4vqh-8jrm","MINI-h7gc-2ggj-f75c","MINI-hg4r-84vf-w9rp","MINI-hxw3-vjgf-fc35","MINI-m2r9-43xq-wxjm","MINI-pv2p-ccv3-ghf3","MINI-v87r-r2cf-c3x3","MINI-xm3j-wxgp-w468","ROOT-APP-NPM-CVE-2026-9277","UBUNTU-CVE-2026-9277","openSUSE-SU-2026:10861-1","openSUSE-SU-2026:20839-1"],"analysis":{"component_type":"library","fix_type":"patch","impacts":["code_execution"],"network_reachable":"yes","non_default_config":false,"product_category":"JavaScript shell quoting library","requires_auth":"none","summary":"Attackers can execute arbitrary commands by injecting line terminators into object tokens passed to the shell-quote library's quote function.","user_interaction":"not_required","vuln_class":"command_injection"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"harborist","cpe":[],"cvss":{"score":9.2,"severity":"critical","source":"cna","vector":"CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N","version":"4.0"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"},{"id":"CWE-77","name":"Improper Neutralization of Special Elements used in a Command"}],"description":"shell-quote's `quote()` function did not validate object-token inputs against the operator model used by `parse()`. The `.op` field was backslash-escaped character by character using `/(.)/g`, which in JavaScript does not match line terminators (\\n, \\r, U+2028, U+2029). A line terminator in `.op` therefore passed through unescaped into the output; POSIX shells treat a literal newline as a command separator, so any content after it would execute as a second command. The vulnerable code path is reachable in two ways: (1) direct construction of `{ op: '...\\n...' }` from external input, and (2) via `parse(cmd, envFn)` when `envFn` returns object tokens whose `.op` is attacker-influenced. Both are documented API surface. Fixed by replacing the per-character escape with strict shape validation: `.op` must match the parser's control-operator allowlist; `{ op: 'glob', pattern }` validates `pattern` and forbids line terminators; `{ comment }` validates `comment` and forbids line terminators; any other object shape throws `TypeError`.","ecosystems":["npm","openSUSE:Tumbleweed"],"exploits":{"exploitdb":0,"first_seen":"2026-06-15","github_poc":1,"max_poc_stars":2,"metasploit":0,"nuclei":0,"refs":[{"date":"2026-06-15T13:37:09Z","kind":"github_poc","ref":"https://github.com/DylanZahedi/CVE-2026-9277","stars":2,"title":null}],"tier":"poc_unverified"},"has_fix":true,"headline":"shell-quote `quote()` does not validate object-token shapes, allowing command injection via line terminators in `.op`","id":"CVE-2026-9277","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"npm","product":null,"products":[],"type":"command_injection","year":"2026"},"n_packages":3,"n_references":4,"next":{"headline":"Form Builder CP \u003c 1.2.47 - Editor+ Stored XSS via form_structure","id":"CVE-2026-9278"},"packages":[{"ecosystem":"npm","fixed":["1.8.4"],"introduced":["1.1.0"],"last_affected":[],"package":"shell-quote","purl":null,"source":"GHSA-w7jw-789q-3m8p"},{"ecosystem":"npm","fixed":["1.8.4"],"introduced":["1.1.0"],"last_affected":[],"package":"shell-quote","purl":"pkg:npm/shell-quote","source":"GHSA-w7jw-789q-3m8p"},{"ecosystem":"openSUSE:Tumbleweed","fixed":["4.2.0-2.1"],"introduced":["0"],"last_affected":[],"package":"python-pytest-html","purl":"pkg:rpm/opensuse/python-pytest-html\u0026distro=openSUSE%20Tumbleweed","source":"openSUSE-SU-2026:10861-1"}],"prev":{"headline":"Information Exposure Vulnerability in CP-Plus Wi-Fi Camera","id":"CVE-2026-9274"},"products":["shell-quote"],"published":"2026-05-22","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":"SUSE","prefix":"openSUSE"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"},{"class":"open","licence":"CC0","name":"PoC-in-GitHub"}],"ssvc":{"automatable":"no","exploitation":"none","technical_impact":"total"},"state":"PUBLISHED","updated":"2026-09-14","vendors":[]},"summary":"Attackers can execute arbitrary commands by injecting line terminators into object tokens passed to the shell-quote library's quote function.","url":"https://insights.sbomify.com/CVE-2026-9277/"}