---
title: "CVE-2026-102422: shell-quote: `quote()` command injection via a line terminator in a token after a `{ comment }` token"
url: https://erroneo.us/security/cve/CVE-2026-102422/
description: "CVE-2026-102422 (shell-quote (npm)): shell-quote's quote() function emits a { comment } token as # followed by its text, which comments out the rest of the…"
type: vulnerability-record
section: "Security Digest"
date_published: 2026-09-29
date_modified: 2026-10-06
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2026-102422"
kev: false
cvss: 9.2
epss: 0.00383
license: All rights reserved. Quote with attribution and a link.
---

# CVE-2026-102422: shell-quote: `quote()` command injection via a line terminator in a token after a `{ comment }` token

**Signal:** Critical and remotely reachable. No known exploitation yet, but it is network-reachable without credentials. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

- No confirmed exploitation. It is not in CISA’s KEV catalog and CISA’s SSVC assessment records no known exploitation. That can change quickly after a public write-up; re-check if you are affected.
- EPSS 0.4% , percentile 31: FIRST’s model estimates a 0.4% chance of exploitation activity in the next 30 days, higher than 31% of all scored CVEs (low). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes shell-quote (npm) >= 1.8.4, < 1.11.0, fixed in 1.11.0 . Check your lockfile, including transitive dependencies.

## What it is

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 packages

- npm `shell-quote` >= 1.8.4, < 1.11.0 → fixed: 1.11.0

## Affected products (CVE record)

-  shell-quote: 1.8.4 < 1.11.0

## Severity

- harborist CVSS 3.1: 8.1 `CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`
- harborist CVSS 4.0: 9.2 `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`
- GitHub CVSS 4.0: 9.2 `CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N`

## Exploitation

- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation none , automatable no , technical impact total .
- FIRST EPSS (model of 2026-10-21): 0.38% probability of exploitation activity in the next 30 days; percentile 31.

## Sources

- [GHSA-pqg4-j6r4-53mv](https://github.com/ljharb/shell-quote/security/advisories/GHSA-pqg4-j6r4-53mv)
- [Fix commit](https://github.com/ljharb/shell-quote/commit/6002b2ed90c6b83095eb272b6b0adaf3a172b0bc)
- [GitHub Advisory GHSA-pqg4-j6r4-53mv](https://github.com/advisories/GHSA-pqg4-j6r4-53mv)
- [CVE.org record CVE-2026-102422](https://www.cve.org/CVERecord?id=CVE-2026-102422)
- [NVD entry CVE-2026-102422](https://nvd.nist.gov/vuln/detail/CVE-2026-102422)
- [github.com](https://github.com/ljharb/shell-quote)
- [npmjs.com](https://www.npmjs.com/package/shell-quote)

---
Source page: https://erroneo.us/security/cve/CVE-2026-102422/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
