Security Digest · Vulnerability record
CVE-2026-102422: shell-quote: `quote()` command injection via a line terminator in a token after a `{ comment }` token
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.
CVSS 9.2 Critical EPSS 0.4% · p31
Should you act?
Critical and remotely reachable
No known exploitation yet, but it is network-reachable without credentials. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.
- 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.
From the GitHub advisory
Impact
quote() 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 in that later string ends the comment, and the rest of the string is parsed as shell input:
Passed to sh, bash, dash, ksh, or zsh, this runs id.
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.
Exploitation requires an attacker-controlled string containing a line terminator that follows a { comment } token in the same quote() call.
Weakness type: CWE-78.
Product: shell-quote (npm) · Assigned by: harborist · Published: 2026-09-29
Affected and fixed versions
| Ecosystem | Package | Vulnerable | First fixed |
|---|---|---|---|
| npm | shell-quote | >= 1.8.4, < 1.11.0 | 1.11.0 |
| Vendor | Product | Affected versions (per CVE record) |
|---|---|---|
| shell-quote | 1.8.4 < 1.11.0 |
Severity scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| harborist | 3.1 | 8.1 High | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H |
| harborist | 4.0 | 9.2 Critical | 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 | 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 |
- Attack vector: network (remotely reachable)
- Attack complexity: low
- Attack requirements: present (depends on deployment conditions)
- Privileges required: none (no login)
- User interaction: none
CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.
Exploitation and urgency
- 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.
Timeline
- — CVE record published by harborist
- — CVE record last updated
- — GitHub-reviewed advisory GHSA-pqg4-j6r4-53mv published (critical)
Sources and references
Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.
Vendor and project advisories, patches
- GHSA-pqg4-j6r4-53mv github.com
- Fix commit github.com
Vulnerability records
- GitHub Advisory GHSA-pqg4-j6r4-53mv github.com
- CVE.org record CVE-2026-102422 cve.org
- NVD entry CVE-2026-102422 nvd.nist.gov
Other references from the CVE record and advisory
- github.com github.com
- npmjs.com npmjs.com