CVE Watchtower

CVE-2026-9277shell-quote OS Command Injection

NVD

Vulnerability Summary

shell-quote's `quote()` function did not validate object-token inputs against the operator model used by `parse()`. The `.op` field was backslash-escaped character by character using `/(.)/g`, which in JavaScript does not match line terminators (\n, \r, U+2028, U+2029). A line terminator in `.op` therefore passed through unescaped into the output; POSIX shells treat a literal newline as a command separator, so any content after it would execute as a second command. The vulnerable code path is reachable in two ways: (1) direct construction of `{ op: '...\n...' }` from external input, and (2) via `parse(cmd, envFn)` when `envFn` returns object tokens whose `.op` is attacker-influenced. Both are documented API surface. Fixed by replacing the per-character escape with strict shape validation: `.op` must match the parser's control-operator allowlist; `{ op: 'glob', pattern }` validates `pattern` and forbids line terminators; `{ comment }` validates `comment` and forbids line terminators; any other object shape throws `TypeError`.
Severity Level
HIGH(8.1)
Published Date
May 22, 2026
Last Modified
Sep 14, 2026
Exploitation Status
No confirmed exploitation yet
EPSS Score (30-Day)
0.82%Probability
Root Weakness (CWE)
The software constructs all or part of an OS command using externally-influenced input, but does not properly neutralize special elements.
The product constructs all or part of a command using externally-influenced input but does not neutralize special elements that could modify the intended command.
CVSS v4.0 Base Metrics — Score 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
Attack VectorNetwork
Attack ComplexityLow
Attack RequirementsPresent
Privileges RequiredNone
User InteractionNone
Confidentiality (Vulnerable System)High
Integrity (Vulnerable System)High
Availability (Vulnerable System)High
Confidentiality (Subsequent System)None
Integrity (Subsequent System)None
Availability (Subsequent System)None
Show CVSS v3.x metrics (score 8.1)
CVSS v3.1 Base Metrics — Score 8.1 (HIGH)
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack VectorNetwork
Attack ComplexityHigh
Privileges RequiredNone
User InteractionNone
ScopeUnchanged
ConfidentialityHigh
IntegrityHigh
AvailabilityHigh

Affected & Patched Versions

Affected Versions
  • shell-quote >= 1.1.0 and < 1.8.4
Patched Versions
  • shell-quote 1.8.4

What to do

Plan remediation soon. No exploitation is confirmed yet, but the severity is high.

  1. Check whether you run shell-quote and which version.
  2. Update to a patched version listed above, then confirm the new version.

Timeline

  • May 22, 2026Published
  • Sep 14, 2026Record last modified

Score, severity and exploitation changes are tracked from the day Watchtower started logging them.

Get notified about new shell-quote CVEsYou are reading CVE-2026-9277. Get an email when KEV listings, exploits or new CVEs match your stack.
Set up CVE alerts

More shell-quote CVEs

Data last checked: Nov 15, 2026 03:31 UTC