# CVE-2026-9277: node-shell-quote: shell-quote's `quote()` function did not validate object-token inputs against the operator model used by `parse()`

CVE-2026-9277 is fixed in 2 products on 1 platform, first by node-shell-quote 1.6.1+20160617-git72fb5a8ce29b-1ubuntu0.1~esm1, released May 22, 2026. It is not reported as exploited. Patch Radar priority: Routine.

- Web page: https://patchblox.com/security/cve/CVE-2026-9277
- Priority: Routine
- CVSS: n/a (Medium)
- EPSS: 0.0079
- CISA KEV: not listed
- Exploited (vendor report): no
- Publicly disclosed: no
- Published: May 22, 2026

## 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`.

## Where it's fixed

| Platform | Product | Fixed in | Fix | Released |
|---|---|---|---|---|
| Linux | agama-web-ui opensuse-leap 16.0 | 17+612.d8bf69336-160000.11.1 | [OPENSUSE-SU-2026:20919-1](https://patchblox.com/security/data/fix/linux/opensuse-su-2026-20919-1.md) | Jun 8, 2026 |
| Linux | node-shell-quote Debian 12.15 (bookworm) | 1.7.4+~1.7.1-1+deb12u1 | [DEBIAN-CVE-2026-9277](https://patchblox.com/security/data/fix/linux/debian-cve-2026-9277.md) | May 27, 2026 |
| Linux | node-shell-quote Debian 13.5 (trixie) | 1.7.4+~1.7.1-1+deb13u1 | [DEBIAN-CVE-2026-9277](https://patchblox.com/security/data/fix/linux/debian-cve-2026-9277.md) | May 27, 2026 |
| Linux | node-shell-quote Debian 14 | 1.8.4+~1.7.5-1 | [DEBIAN-CVE-2026-9277](https://patchblox.com/security/data/fix/linux/debian-cve-2026-9277.md) | May 27, 2026 |
| Linux | node-shell-quote Ubuntu 18.04.6 LTS (bionic) | 1.6.1+20160617-git72fb5a8ce29b-1ubuntu0.1~esm1 | [node-shell-quote 1.6.1+20160617-git72fb5a8ce29b-1ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-bionic-node-shell-quote-1.6.1-20160617-git72fb5a8ce29b-1ubuntu0.1-esm1.md) | May 22, 2026 |
| Linux | node-shell-quote Ubuntu 22.04.1 LTS (jammy) | 1.7.3+~1.7.1-1ubuntu0.1~esm1 | [node-shell-quote 1.7.3+~1.7.1-1ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-jammy-node-shell-quote-1.7.3-1.7.1-1ubuntu0.1-esm1.md) | May 22, 2026 |
| Linux | node-shell-quote Ubuntu 24.04.5 LTS (noble) | 1.7.4+~1.7.1-1ubuntu0.24.04.1 | [node-shell-quote 1.7.4+~1.7.1-1ubuntu0.24.04.1](https://patchblox.com/security/data/fix/linux/ubuntu-noble-node-shell-quote-1.7.4-1.7.1-1ubuntu0.24.04.1.md) | May 22, 2026 |
| Linux | node-shell-quote Ubuntu 25.10 (questing) | 1.7.4+~1.7.1-1ubuntu0.25.10.1 | [node-shell-quote 1.7.4+~1.7.1-1ubuntu0.25.10.1](https://patchblox.com/security/data/fix/linux/ubuntu-questing-node-shell-quote-1.7.4-1.7.1-1ubuntu0.25.10.1.md) | May 22, 2026 |
| Linux | node-shell-quote Ubuntu 26.04.1 LTS (resolute) | 1.8.3+~1.7.5-1ubuntu0.1~esm1 | [node-shell-quote 1.8.3+~1.7.5-1ubuntu0.1~esm1](https://patchblox.com/security/data/fix/linux/ubuntu-resolute-node-shell-quote-1.8.3-1.7.5-1ubuntu0.1-esm1.md) | May 22, 2026 |

---

Data as of 2026-11-08T00:53:09Z UTC. Source: Patchblox Patch Radar (https://patchblox.com/security/patch-radar). Patchblox finds out-of-date software on Windows, macOS and Linux and updates it through release rings: https://patchblox.com/demo

Free to use with attribution: show "Data: Patchblox Patch Radar" with a link to https://patchblox.com/security/patch-radar. Terms, including what needs a written agreement: https://patchblox.com/security/patch-radar/use-the-data

Product names, logos and trademarks shown on Patch Radar belong to their respective owners. They are used only to identify the software each security fix applies to and to help readers find their platform. Their use does not imply any affiliation with, or endorsement by, those owners, and Patchblox is not affiliated with any of them.
