{"id":"CVE-2026-102422","published":"2026-09-29T03:47:36Z","modified":"2026-09-30T15:18:32Z","title":"shell-quote `quote()` command injection via a line terminator in a token after a `{ comment }` token","vendor":null,"product":null,"tier":"tail","description":{"text":"shell-quote's `quote()` function emits a `{ comment }` token as `#` followed by its text, which comments out the rest of the shell line, including the opening quote of any later string token. A line terminator (\\n, \\r, U+2028, U+2029) in that later string therefore ends the comment, and the rest of the string is parsed as shell input: `quote(['echo', 'ok', { comment: 'x' }, 'a\\nid;#'])` runs `id` in sh, bash, dash, ksh and zsh. `parse()` emits a comment token for a `#` in the middle of a word (for example `http://example.com/#frag`), so callers that combine `parse()` output with another untrusted string, such as `quote(parse(untrustedCommand).concat(untrustedArg))`, are affected. The fix for CVE-2026-9277 rejected line terminators in the comment's own text, but not in the tokens after it. Fixed in 1.11.0: `quote()` throws a `TypeError` when a string after a `{ comment }` token contains a line terminator.","provenance":"source","from":"CVE.org"},"cvss":{"score":8.1,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0048,"percentile":0.42308,"provenance":"source"},"cwes":[{"id":"CWE-78","name":"Improper Neutralization of Special Elements used in an OS Command"}],"references":[{"url":"https://github.com/ljharb/shell-quote/security/advisories/GHSA-pqg4-j6r4-53mv","tags":["vendor-advisory"]},{"url":"https://github.com/ljharb/shell-quote/commit/6002b2ed90c6b83095eb272b6b0adaf3a172b0bc","tags":["patch"]},{"url":"https://github.com/ljharb/shell-quote","tags":["product"]},{"url":"https://www.npmjs.com/package/shell-quote","tags":["product"]}],"priority":{"score":19.1,"factors":[{"name":"EPSS percentile","points":8.46},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":5.67}]},"exploitSources":{"pocGithub":{"count":2,"skipped":0,"earliest":"2026-10-07","earliestUrl":"https://github.com/DevVaibhav07/CVE-2026-102422","repos":[{"name":"DevVaibhav07/CVE-2026-102422","url":"https://github.com/DevVaibhav07/CVE-2026-102422","stars":0,"created":"2026-10-07"},{"name":"federiconbaez/cortex9-shell-quote-comment-line-terminator-model","url":"https://github.com/federiconbaez/cortex9-shell-quote-comment-line-terminator-model","stars":0,"created":"2026-11-09"}]},"first":{"date":"2026-10-07","source":"PoC-in-GitHub","url":"https://github.com/DevVaibhav07/CVE-2026-102422"},"provenance":"source"},"affectedVersions":[{"vendor":null,"product":"shell-quote","versions":[">= 1.8.4, < 1.11.0"]}],"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2026-09-30T15:18:10.710251Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"shell-quote","vulnerableRanges":[">=1.8.4, <1.11.0"],"patched":["1.11.0"],"from":["GHSA-pqg4-j6r4-53mv"],"provenance":"source"}],"summary":{"text":"The shell-quote library's quote() function (a component of the shell-quote package) fails to neutralise line terminators in string tokens that follow a { comment } token, so an attacker-controlled string containing a newline, carriage return, U+2028 or U+2029 escapes the shell comment and is executed as shell input.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:48:22Z"},"euvd":{"id":"EUVD-2026-88629","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2021-42740","published":"2021-10-21","fixed":"1.7.3","kev":false},{"cve":"CVE-2026-9277","published":"2026-05-22","fixed":"1.8.4","kev":false},{"cve":"CVE-2026-13311","published":"2026-06-25","fixed":"1.9.0","kev":false,"link":{"from":"CVE-2026-13311","to":"CVE-2026-102422","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:shell-quote","fromFixed":"1.9.0","toFixed":"1.11.0","daysApart":96}]}},{"cve":"CVE-2026-102422","published":"2026-09-29","fixed":"1.11.0","kev":false}],"package":"npm:shell-quote"}}