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. 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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- High
Exploit likelihood
What each source reports
CVE List Score used
9.2
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. 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.
- Record
CVE-2026-102422- CVSS 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 - CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
EUVDEUVD-2026-88629
9.2
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.
- Record
EUVD-2026-88629- CVSS 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 - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-pqg4-j6r4-53mv
9.2
shell-quote: `quote()` command injection via a line terminator in a token after a `{ comment }` token
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:
quote(['echo', 'ok', { comment: 'x' }, 'a\nid;#']);
// echo ok #x 'a
// id;#'
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.
Patches
Fixed in v1.11.0: quote() throws a TypeError when a string after a { comment } token contains a line terminator (\n, \r, U+2028, or U+2029).
Workarounds
Drop every token after a { comment } token before calling quote(), or reject line terminators in untrusted strings. Separately, do not append other shell text after quote() output that contains a comment, since the comment swallows it.
- Record
GHSA-pqg4-j6r4-53mv- CVSS 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 - CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
NVD
9.2
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.
- Record
CVE-2026-102422- CVSS 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
OSV
9.2
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. 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.
- Record
CVE-2026-102422- CVSS 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 - Weakness
- CWE-78
- Updated
- 2026-11-02
OSVDEBIAN-CVE-2026-102422
9.2
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.
- Record
DEBIAN-CVE-2026-102422- CVSS 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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X - Updated
- 2026-11-02
Show 8 moreShow less
OSVGHSA-pqg4-j6r4-53mv
9.2
shell-quote: `quote()` command injection via a line terminator in a token after a `{ comment }` token
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:
quote(['echo', 'ok', { comment: 'x' }, 'a\nid;#']);
// echo ok #x 'a
// id;#'
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.
Patches
Fixed in v1.11.0: quote() throws a TypeError when a string after a { comment } token contains a line terminator (\n, \r, U+2028, or U+2029).
Workarounds
Drop every token after a { comment } token before calling quote(), or reject line terminators in untrusted strings. Separately, do not append other shell text after quote() output that contains a comment, since the comment swallows it.
- Record
GHSA-pqg4-j6r4-53mv- CVSS 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 - CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H - Weakness
- CWE-78
- Updated
- 2026-11-02
OSVRHSA-2026:69544
8.1
Red Hat Security Advisory: Red Hat Hardened Images RPMs bug fix and enhancement update
- Record
RHSA-2026:69544- CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVRHSA-2026:72498
8.1
Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update
- Record
RHSA-2026:72498- CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVRHSA-2026:72507
8.1
Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update
- Record
RHSA-2026:72507- CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVRHSA-2026:72750
8.1
Red Hat Security Advisory: Red Hat Hardened Images RPMs Security Update
- Record
RHSA-2026:72750- CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVUBUNTU-CVE-2026-102422
9.2
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.
- Record
UBUNTU-CVE-2026-102422- CVSS 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 - CVSS 3.1
- 8.1 High
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H - Updated
- 2026-11-02
OSVCLSA-2026-1790673243 No score
TuxCare security update for shell-quote (1 CVE)
TuxCare rebuilt shell-quote to address 1 CVE. Fixed in 1.10.0-tuxcare.1.
- Record
CLSA-2026-1790673243- Updated
- 2026-11-02
OSVROOT-APP-NPM-CVE-2026-102422 No score
CVE-2026-102422 in shell-quote - Patched by Root
Root has patched CVE-2026-102422 in the shell-quote package for Root:npm. Multiple fixed versions available.
- Record
ROOT-APP-NPM-CVE-2026-102422- Updated
- 2026-11-02
Affected packages
| Package | Affected | Fixed |
|---|---|---|
shell-quotenpm |
1.8.4 up to 1.11.0 | 1.11.0 |
shell-quoteTuxCare:npm |
1.10.0-tuxcare.0 up to 1.10.0-tuxcare.1, plus listed versions 1.10.0 |
1.10.0-tuxcare.1 |
node-shell-quoteDebian:12 |
All versions, plus listed versions 1.10.0-11.12.0-11.7.4+~1.7.1-11.7.4+~1.7.1-1+deb12u11.7.4+~1.7.1-21.8.3+~1.7.5-11.8.4+~1.7.5-11.9.0+~1.7.5-1 |
None known |
node-shell-quoteDebian:13 |
before 1.7.4+~1.7.1-1+deb13u2, plus listed versions 1.7.4+~1.7.1-11.7.4+~1.7.1-1+deb13u1 |
1.7.4+~1.7.1-1+deb13u2 |
node-shell-quoteDebian:14 |
before 1.12.0-1, plus listed versions 1.10.0-11.7.4+~1.7.1-11.7.4+~1.7.1-21.8.3+~1.7.5-11.8.4+~1.7.5-11.9.0+~1.7.5-1 |
1.12.0-1 |
jaegerRed Hat:hummingbird:1 |
before 0:2.20.0-0.11.hum1 | 0:2.20.0-0.11.hum1 |
grafana13.1Red Hat:hummingbird:1 |
before 0:13.1.6-0.4.hum1 | 0:13.1.6-0.4.hum1 |
grafana13.2Red Hat:hummingbird:1 |
before 0:13.2.1-0.8.hum1 | 0:13.2.1-0.8.hum1 |
prometheus3.13Red Hat:hummingbird:1 |
before 0:3.13.3-0.2.hum1 | 0:3.13.3-0.2.hum1 |
shell-quoteRoot:npm |
before 1.9.0-aikido.1 | 1.9.0-aikido.11.10.0-aikido.11.8.4-aikido.1 |
Show 6 moreShow less
| Package | Affected | Fixed |
|---|---|---|
@rootio/shell-quoteRoot:npm |
before 1.9.0-root.io.1 | 1.9.0-root.io.11.10.0-root.io.11.8.4-root.io.1 |
node-shell-quoteUbuntu:Pro:18.04:LTS |
All versions, plus listed versions 1.6.1+20160617-git72fb5a8ce29b-11.6.1+20160617-git72fb5a8ce29b-1ubuntu0.1~esm1 |
None known |
node-shell-quoteUbuntu:Pro:22.04:LTS |
All versions, plus listed versions 1.7.3+~1.7.1-11.7.3+~1.7.1-1ubuntu0.1~esm1 |
None known |
node-shell-quoteUbuntu:24.04:LTS |
All versions, plus listed versions 1.7.4+~1.7.1-11.7.4+~1.7.1-1ubuntu0.24.04.1 |
None known |
node-shell-quoteUbuntu:26.10 |
All versions, plus listed versions 1.8.3+~1.7.5-11.9.0+~1.7.5-11.10.0-1 |
None known |
node-shell-quoteUbuntu:Pro:26.04:LTS |
All versions, plus listed versions 1.7.4+~1.7.1-11.8.3+~1.7.5-11.8.3+~1.7.5-1ubuntu0.1~esm1 |
None known |
Public exploits
Links only. Every CVE stores no exploit code.
| Source | Link | Date |
|---|---|---|
| PoC in GitHub | DevVaibhav07/CVE-2026-102422 | 2026-10-07 |
History
| Recorded | Changed | Sources |
|---|---|---|
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV, PoC in GitHub |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2026-102422 is a critical vulnerability (CVSS 9.2) in Shell-quote, published September 29, 2026. Public exploit code exists. EPSS puts the chance of exploitation in the next 30 days at 0.38%, the 31st percentile. Fixed in shell-quote 1.11.0.
References
github.com/ljharb/shell-quote/security/advisories/GHSA-pqg4-j6r4-53mv
github.com/ljharb/shell-quote/commit/6002b2ed90c6b83095eb272b6b0adaf3a172b0bc
github.com/ljharb/shell-quote
npmjs.com/package/shell-quote
nvd.nist.gov/vuln/detail/CVE-2026-102422
github.com/advisories/GHSA-pqg4-j6r4-53mv
Show 52 moreShow less
github.com/CVEProject/cvelistV5/tree/main/cves/2026/102xxx/CVE-2026-102422.json
security-tracker.debian.org/tracker/CVE-2026-102422
access.redhat.com/errata/RHSA-2026:69544
images.redhat.com
access.redhat.com/security/cve/CVE-2026-102422
access.redhat.com/security/updates/classification
security.access.redhat.com/data/csaf/v2/advisories/2026/rhsa-2026_69544.json
bugzilla.redhat.com/show_bug.cgi?id=2542933
cve.org/CVERecord?id=CVE-2026-102422
access.redhat.com/errata/RHSA-2026:72498
access.redhat.com/security/cve/CVE-2026-93450
access.redhat.com/security/cve/CVE-2026-61709
access.redhat.com/security/cve/CVE-2026-63209
security.access.redhat.com/data/csaf/v2/advisories/2026/rhsa-2026_72498.json
bugzilla.redhat.com/show_bug.cgi?id=2535473
cve.org/CVERecord?id=CVE-2026-61709
nvd.nist.gov/vuln/detail/CVE-2026-61709
github.com/openfga/openfga/commit/171806c93b86bca29e0212ceb8b6ee9c48eb9ac3
github.com/openfga/openfga/releases/tag/v1.18.1
github.com/openfga/openfga/security/advisories/GHSA-g3pg-frfm-pr2m
bugzilla.redhat.com/show_bug.cgi?id=2543236
cve.org/CVERecord?id=CVE-2026-63209
nvd.nist.gov/vuln/detail/CVE-2026-63209
github.com/klauspost/compress/commit/539243b8823ee8f03e49969823d57c348c917536
github.com/klauspost/compress/releases/tag/v1.18.7
github.com/klauspost/compress/security/advisories/GHSA-259r-337f-4rfw
bugzilla.redhat.com/show_bug.cgi?id=2538979
cve.org/CVERecord?id=CVE-2026-93450
nvd.nist.gov/vuln/detail/CVE-2026-93450
github.com/go-openapi/swag
github.com/go-openapi/swag/blob/v0.27.0/jsonutils/adapters/stdlib/json/adapter.go
github.com/go-openapi/swag/blob/v0.27.0/jsonutils/adapters/stdlib/json/ordered_map.go
github.com/go-openapi/swag/commit/0c24346ced59a25811e8694a915e7131d25ccb0e
github.com/go-openapi/swag/security/advisories/GHSA-xh24-9qpg-8w28
vulncheck.com/advisories/go-openapi-swag-jsonutils-before-0.27.1-uncontrolled-recursion-in-ordered-json-marshal-and-unmarshal
access.redhat.com/errata/RHSA-2026:72507
access.redhat.com/security/cve/CVE-2026-81842
security.access.redhat.com/data/csaf/v2/advisories/2026/rhsa-2026_72507.json
bugzilla.redhat.com/show_bug.cgi?id=2543653
cve.org/CVERecord?id=CVE-2026-81842
nvd.nist.gov/vuln/detail/CVE-2026-81842
grafana.com/security/security-advisories/cve-2026-81842
access.redhat.com/errata/RHSA-2026:72750
access.redhat.com/security/cve/CVE-2026-56851
security.access.redhat.com/data/csaf/v2/advisories/2026/rhsa-2026_72750.json
bugzilla.redhat.com/show_bug.cgi?id=2547607
cve.org/CVERecord?id=CVE-2026-56851
nvd.nist.gov/vuln/detail/CVE-2026-56851
go.dev/cl/793360
go.dev/issue/80112
pkg.go.dev/vuln/GO-2026-6629
ubuntu.com/security/CVE-2026-102422