CVE-2026-102422
shell-quote `quote()` command injection via a line terminator in a token after a `{ comment }` token
Also known as GHSA-pqg4-j6r4-53mv
Mitigation
- Upgrade shell-quote to 1.11.0 or later.
Who should check
- Projects that depend on npm package shell-quote (>= 1.8.4, < 1.11.0)
- Anyone running shell-quote >= 1.8.4, < 1.11.0
Vulnerability facts
- Affected
- shell-quote >= 1.8.4, < 1.11.0
- Fixed in
- 1.11.0
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- None known
- Remote exploitation
- Remote, no login needed
- CVSS
- 9.2 (v4.0, CNA)CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:NOpen in CVSS calculator
Show all 11 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Attack requirements: Present
- Privileges required: None
- User interaction: None
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: High
- Confidentiality impact on other systems: None
- Integrity impact on other systems: None
- Availability impact on other systems: None
- EPSS
- 0.69% chance of exploitation in 30 days (percentile 48, 2026-11-26)
- CWE
- CWE-78
- Modified
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 and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| npm shell-quote | >= 1.8.4, < 1.11.0 | 1.11.0 | osv |
| shell-quote | >= 1.8.4, < 1.11.0 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2026-102422. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2026-102422.md Affected: shell-quote >= 1.8.4, < 1.11.0 Fixed in: 1.11.0 Steps: 1. Search this machine and project for shell-quote (npm), shell-quote: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
FAQ
Is CVE-2026-102422 being exploited?
There is no confirmed exploitation: CVE-2026-102422 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.69% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2026-102422?
Critical: CVSS 9.2 (v4.0, scored by CNA). Remote, no login needed.
Which versions are affected by CVE-2026-102422?
shell-quote >= 1.8.4, < 1.11.0.
Is there a fix for CVE-2026-102422?
Yes. Fixed in 1.11.0. Upgrade shell-quote to 1.11.0 or later.
How do I check if I'm affected by CVE-2026-102422?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.