Every CVE Search/ Get API key

CVE-2026-102422

shell-quote `quote()` command injection via a line terminator in a token after a `{ comment }` token

9.2 CriticalPublic exploitFix available

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

0.38%Unchanged since Sep 29, 2026
90%50%10%1%

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 CriticalCVSS: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 HighCVSS: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 CriticalCVSS: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 CriticalCVSS: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 HighCVSS: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 CriticalCVSS: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 HighCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS: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 HighCVSS: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 CriticalCVSS: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 HighCVSS: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

Affected packages
PackageAffectedFixed
shell-quote
npm
1.8.4 up to 1.11.0
1.11.0
shell-quote
TuxCare: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-quote
Debian: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-quote
Debian: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-quote
Debian: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
jaeger
Red Hat:hummingbird:1
before 0:2.20.0-0.11.hum1
0:2.20.0-0.11.hum1
grafana13.1
Red Hat:hummingbird:1
before 0:13.1.6-0.4.hum1
0:13.1.6-0.4.hum1
grafana13.2
Red Hat:hummingbird:1
before 0:13.2.1-0.8.hum1
0:13.2.1-0.8.hum1
prometheus3.13
Red Hat:hummingbird:1
before 0:3.13.3-0.2.hum1
0:3.13.3-0.2.hum1
shell-quote
Root:npm
before 1.9.0-aikido.1
1.9.0-aikido.11.10.0-aikido.11.8.4-aikido.1
Show 6 moreShow less
Affected packages
PackageAffectedFixed
@rootio/shell-quote
Root: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-quote
Ubuntu: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-quote
Ubuntu: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-quote
Ubuntu: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-quote
Ubuntu: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-quote
Ubuntu: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.

Public exploits
SourceLinkDate
PoC in GitHubDevVaibhav07/CVE-2026-1024222026-10-07

History

History
RecordedChangedSources
first indexedCVE 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

Show 52 moreShow less
MoveEnter Open