Vulnerability
CVE-2026-102422
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.
58 advisories report this vulnerability, across 7 ecosystems.
Advisories
- CGA-22fx-q5h3-vrcp
- CGA-2h9r-v78q-96jv
- CGA-2j32-x6pc-f444
- CGA-4gcq-7h7w-fh33
- CGA-562w-6frw-9h3q
- CGA-5p7x-xg9w-j6vx
- CGA-5wq9-57g9-8xc2
- CGA-6hgx-m5pv-3cqx
- CGA-6hhg-c5gf-cxvf
- CGA-6vjc-vp8r-27xh
- CGA-7mp8-7x65-6cr8
- CGA-7xjq-cxqw-2462
- CGA-86xj-hm34-92pr
- CGA-9jmc-48wg-x99r
- CGA-c2v9-93x7-fxrg
- CGA-c8qx-jw7w-93xp
- CGA-cq4j-2h5f-fwc3
- CGA-f4f8-9636-f5m2
- CGA-f8pv-6rfw-q27q
- CGA-fg4v-5g95-79wq
- CGA-fp4p-5f4v-x5m9
- CGA-g458-f3wr-cmg2
- CGA-g9xq-c429-9rg8
- CGA-ghc6-85ww-h3mh
- CGA-gjc4-563w-3m25
- CGA-gmcf-jp57-p9c2
- CGA-gmr6-mc4c-wx3q
- CGA-gw4f-3599-px9f
- CGA-h27q-979c-wrmx
- CGA-h5v4-6wfj-hwpx
- CGA-h79p-fw45-gfw7
- CGA-h8f4-xgxw-7vg5
- CGA-hqw3-rhf4-g43j
- CGA-j6qm-88f6-j239
- CGA-jhgq-rr8x-6gj4
- CGA-jhqp-j738-9gwv
- CGA-mfrh-qpmw-rcrf
- CGA-p6c7-82v9-3844
- CGA-pqx6-mmqj-c3j2
- CGA-q2qr-m67w-prmf
- CGA-q8m8-rj92-f3x7
- CGA-qmp7-x3q4-7ffq
- CGA-qpqx-hffx-92p5
- CGA-v38h-45pv-8m4g
- CGA-v55x-8c6p-374h
- CGA-vmfh-3hfh-558v
- CGA-vwq8-v24m-r9q3
- CGA-w9xq-j853-2c8m
-
DEBIAN-CVE-2026-102422
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,…
-
DLA-4901-1
node-shell-quote - security update
-
DSA-6548-1
node-shell-quote - security update
-
GHSA-pqg4-j6r4-53mv
shell-quote: `quote()` command injection via a line terminator in a token after a `{ comment }` token
-
RHSA-2026:69544
Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update
-
RHSA-2026:72498
Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update
-
RHSA-2026:72507
Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update
-
RHSA-2026:72750
Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update
-
SUSEVEX-CVE-2026-102422
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,…
-
UBUNTU-CVE-2026-102422
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,…