CVE-2026-102422
published critical CVSS 4.0 · 9.2shell-quote `quote()` command injection via a line terminator in a token after a `{ comment }` token
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| Not stated | — | shell-quote1.8.4 to < 1.11.0 · Other versions: unaffected | Affected | Not stated | harborist |
| Debian | bookworm | node-shell-quote | Advisory build | 1.7.4+~1.7.1-1+deb12u2 | DLA-4901-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | agama-web-uiaarch64 | Advisory build | 25+723.416bea1dc-57.1 | OPENSUSE-SU-2026:12701-1 |
| Debian | trixie | node-shell-quote | Advisory build | 1.7.4+~1.7.1-1+deb13u2 | DSA-6548-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | agama-web-uippc64le | Advisory build | 25+723.416bea1dc-57.1 | OPENSUSE-SU-2026:12701-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | agama-web-uis390x | Advisory build | 25+723.416bea1dc-57.1 | OPENSUSE-SU-2026:12701-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | agama-web-uix86_64 | Advisory build | 25+723.416bea1dc-57.1 | OPENSUSE-SU-2026:12701-1 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 9.2 / 10
- Severity
- critical
- Provider
- harborist · cna
- Vector string
- 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
- Scenarios
- en: GENERAL
Additional Assessments
| Version | Score | Severity | Provider | Vector | Scenarios |
|---|---|---|---|---|---|
| 3.1 | 8.1 | high | harborist · cna | CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H | en: GENERAL |
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| shell-quote | 1.8.4 to < 1.11.0 (affected · semver)Default: unaffected | harborist · cna |
Weaknesses
1- CWE-78 CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
References
4- https://github.com/ljharb/shell-quote
- Fix commit https://github.com/ljharb/shell-quote/commit/6002b2ed90c6b83095eb272b6b0adaf3a172b0bc
- GHSA-pqg4-j6r4-53mv https://github.com/ljharb/shell-quote/security/advisories/GHSA-pqg4-j6r4-53mv
- https://www.npmjs.com/package/shell-quote
Provider assertions
2harborist · cna
shell-quote `quote()` command injection via a line terminator in a token after a `{ comment }` token
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- 2ef76d7e3d18f5f93f4abe016f5e6459a9d6f0d62e9ff0348d44ea95f3a08e21
- Ingested
- 30 Sep 2026, 15:44:22 UTC
- Source record
- Official CVE record