Vulnerability
CVE-2026-9277
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`.
77 advisories report this vulnerability, across 8 ecosystems.
Advisories
- CGA-2m7c-6c47-63cm
- CGA-2pxg-7954-j773
- CGA-36j4-vvh6-3qgw
- CGA-37mg-r8xp-fjvc
- CGA-39pf-6frh-jh4q
- CGA-3j77-9q83-cgm8
- CGA-442j-2xmj-3jfv
- CGA-4c7c-vrq4-9x26
- CGA-4p35-658j-64fw
- CGA-4x2g-hhc2-422c
- CGA-5hm4-9qj7-gj5j
- CGA-5hmx-xmq2-h6hx
- CGA-6p3j-f5cm-3rxc
- CGA-6xr8-m2h4-p7v7
- CGA-74pq-6645-745p
- CGA-7hc2-8rx5-62rv
- CGA-7r94-4w39-cfhr
- CGA-826j-v3jv-fj75
- CGA-83h9-6fv8-phpm
- CGA-85hx-r5cj-mh9c
- CGA-8fc3-rh45-vqrg
- CGA-8frg-233r-xjf9
- CGA-8w86-xf42-q3rx
- CGA-924q-6xch-qqh4
- CGA-9gh2-px7r-4j62
- CGA-9vhq-jg4m-2vg3
- CGA-9xgr-6g84-vg4j
- CGA-c74j-9qj4-8vcx
- CGA-ch5v-46h9-5qfr
- CGA-cxp7-ggm5-4857
- CGA-f37g-982m-vfh2
- CGA-fmm2-r92r-7xcm
- CGA-fmrj-6q2h-xqgc
- CGA-g7qj-42mv-39c7
- CGA-gj7f-m6q2-rx9p
- CGA-h6xm-wmm4-qx2r
- CGA-h7v6-xf59-7q9q
- CGA-hp3p-j4gf-gr6c
- CGA-jfr5-pp93-jj2h
- CGA-jg54-5469-cqw8
- CGA-mh8g-wr5q-v8vj
- CGA-mhjq-c6m4-hpjv
- CGA-mx8j-cv45-9q3j
- CGA-p2mf-pf8p-c786
- CGA-p363-57jr-4fq3
- CGA-pchx-96qc-9ww8
- CGA-pm6m-m66p-j6h8
- CGA-q3jj-qr8j-xmrh
- CGA-q62c-9h8c-37rw
- CGA-q7gj-99ph-wrpq
- CGA-qfmj-gg94-c934
- CGA-qggx-f9gj-mm9x
- CGA-qqgg-6gjf-7whp
- CGA-qqqh-9m3m-ccv2
- CGA-qvm8-x3hf-6v4p
- CGA-v9ph-fqc3-qq7r
- CGA-vf9j-c85x-6g7r
- CGA-vff5-hh9p-33w5
- CGA-vfgw-h342-cfx3
- CGA-vfpv-jv56-vgg2
- CGA-vhf2-v4xw-m5w8
- CGA-vhj6-7hmf-vm48
- CGA-w44v-7j39-xrf9
- CGA-w82g-6gcc-89hx
- CGA-wq73-qx6g-frq3
- CGA-xc5v-f2r8-hr5f
- CGA-xxpr-7vrf-m83q
-
DEBIAN-CVE-2026-9277
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…
-
DSA-6300-1
node-shell-quote - security update
-
GHSA-w7jw-789q-3m8p
shell-quote quote() does not escape newlines in object .op values
-
RHVEX-CVE-2026-9277
shell-quote: shell-quote: Arbitrary code execution via command injection due to unescaped line terminators
-
SUSEVEX-CVE-2026-9277
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…
-
UBUNTU-CVE-2026-9277
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…
-
USN-8410-1
node-shell-quote vulnerability
-
openSUSE-SU-2026:10861-1
python311-pytest-html-4.2.0-2.1 on GA media
-
openSUSE-SU-2026:10979-1
agama-web-ui-21+360.16caae772-44.1 on GA media
-
openSUSE-SU-2026:20919-1
Security update for agama-web-ui
References
- https://github.com/ljharb/shell-quote
- https://github.com/ljharb/shell-quote/commit/1518179
- https://github.com/ljharb/shell-quote/security/advisories/GHSA-w7jw-789q-3m8p
- https://www.npmjs.com/package/shell-quote
- http://www.openwall.com/lists/oss-security/2026/05/23/2
- https://access.redhat.com/errata/RHSA-2026:26072
- https://access.redhat.com/errata/RHSA-2026:26077
- https://access.redhat.com/errata/RHSA-2026:26079
- https://access.redhat.com/errata/RHSA-2026:26080
- https://access.redhat.com/errata/RHSA-2026:26090
- https://access.redhat.com/errata/RHSA-2026:26225
- https://access.redhat.com/errata/RHSA-2026:28010
- https://access.redhat.com/errata/RHSA-2026:28571
- https://access.redhat.com/errata/RHSA-2026:29197
- https://access.redhat.com/errata/RHSA-2026:29795
- https://access.redhat.com/errata/RHSA-2026:29834
- https://access.redhat.com/errata/RHSA-2026:30076
- https://access.redhat.com/errata/RHSA-2026:33574
- https://access.redhat.com/errata/RHSA-2026:33683
- https://access.redhat.com/errata/RHSA-2026:34342
- https://access.redhat.com/errata/RHSA-2026:34791
- https://access.redhat.com/errata/RHSA-2026:36754
- https://access.redhat.com/errata/RHSA-2026:40765
- https://access.redhat.com/errata/RHSA-2026:41066
- https://access.redhat.com/errata/RHSA-2026:41928
- https://access.redhat.com/errata/RHSA-2026:42796
- https://access.redhat.com/errata/RHSA-2026:44237
- https://access.redhat.com/errata/RHSA-2026:44263
- https://access.redhat.com/errata/RHSA-2026:44267
- https://access.redhat.com/errata/RHSA-2026:48699
- https://access.redhat.com/errata/RHSA-2026:50850
- https://access.redhat.com/errata/RHSA-2026:56854
- https://access.redhat.com/errata/RHSA-2026:56912
- https://access.redhat.com/errata/RHSA-2026:60023
- https://access.redhat.com/errata/RHSA-2026:62260
- https://access.redhat.com/errata/RHSA-2026:62410
- https://access.redhat.com/security/cve/CVE-2026-9277
- https://bugzilla.redhat.com/show_bug.cgi?id=2480741
- https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-9277.json