Vulnerability · Published Jun 25, 2026 · Assigned by harborist
CVE-2026-13311shell-quote parse() is quadratic in token count, enabling denial of service
High 7.5
In plain English
A high-severity security flaw in shell-quote from ljharb. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.4% (higher than 30% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
shell-quote prior to 1.8.5 finalizes parsed tokens in parse() using Array.prototype.concat as a reduce accumulator, which reallocates and copies the entire growing array on every iteration. As a result parse() runs in O(n^2) time relative to the number of input tokens. An attacker who can supply an attacker-controlled string to any code path that calls parse() (no shell metacharacters are required; plain space-separated words suffice) can block the single-threaded Node.js event loop for an extended period with a small input, resulting in a denial of service. There is no code execution or data disclosure; impact is to availability only. Fixed in 1.8.5.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| Debian:12 | node-shell-quote | no fix listed | DEBIAN-CVE-2026-13311 |
| Debian:13 | node-shell-quote | 1.7.4+~1.7.1-1+deb13u2 | DEBIAN-CVE-2026-13311 |
| Debian:14 | node-shell-quote | 1.9.0+~1.7.5-1 | DEBIAN-CVE-2026-13311 |
| Ubuntu:24.04:LTS | node-shell-quote | no fix listed | UBUNTU-CVE-2026-13311 |
| Ubuntu:25.10 | node-shell-quote | no fix listed | UBUNTU-CVE-2026-13311 |
| Ubuntu:26.10 | node-shell-quote | no fix listed | UBUNTU-CVE-2026-13311 |
| npm | shell-quote | 1.9.0 | GHSA-395f-4hp3-45gv |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| ljharb | shell-quote | 0 – through 1.8.4 |
Weakness: CWE-407 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
References
- GHSA-395f-4hp3-45gv vendor-advisory
- https://www.npmjs.com/package/shell-quote product