Skip to content
OpenAdvisories
High · 8.1 Public exploit CVE-2026-102422 EUVD-2026-88629GHSA-pqg4-j6r4-53mv

shell-quote `quote()` command injection via a line terminator in a token after a `{ comment }` token

Published Sep 29, 2026 · Updated Sep 30, 2026 · Assigned by harborist

Description

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.

Affected products

VendorProductAffectedFixed
— shell-quote 1.8.4 – < 1.11.0 1.11.0

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 node-shell-quote 1.12.0-1 —
Debian 13 node-shell-quote 1.7.4+~1.7.1-1+deb13u2 —
Debian 12 node-shell-quote 1.7.4+~1.7.1-1+deb12u2 —
ReleasePackageFixed inAdvisory
Ubuntu 26.10 node-shell-quote No fix yet —
Ubuntu 24.04 LTS node-shell-quote No fix yet —
Show 3 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 26.04 LTS node-shell-quote No fix yet —
Ubuntu Pro 22.04 LTS node-shell-quote No fix yet —
Ubuntu Pro 18.04 LTS node-shell-quote No fix yet —
ReleasePackageFixed inAdvisory
Red Hat Hardened Images 1 grafana13.1 13.1.6-0.4.hum1 RHSA-2026:72498
Red Hat Hardened Images 1 grafana13.2 13.2.1-0.8.hum1 RHSA-2026:72507
Red Hat Hardened Images 1 jaeger 2.20.0-0.11.hum1 RHSA-2026:69544
Red Hat Hardened Images 1 prometheus3.13 3.13.3-0.2.hum1 RHSA-2026:72750

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling code-server 4.141.0-r1 —
Wolfi rolling renovate 44.133.0-r2 —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 2 repositories

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

Affected packages

EcosystemPackageAffectedFixedRecord
npm shell-quote >= 1.8.4, < 1.11.0 1.11.0 GHSA-pqg4-j6r4-53mv

Advisories 4

References