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.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)0.4%top 70.0% of all CVEs
Exploited in the wildNo reportsCISA SSVC: poc
Attack toolingNoneno public tooling known

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

EcosystemPackageFixed inAdvisory
Debian:12node-shell-quoteno fix listedDEBIAN-CVE-2026-13311
Debian:13node-shell-quote1.7.4+~1.7.1-1+deb13u2DEBIAN-CVE-2026-13311
Debian:14node-shell-quote1.9.0+~1.7.5-1DEBIAN-CVE-2026-13311
Ubuntu:24.04:LTSnode-shell-quoteno fix listedUBUNTU-CVE-2026-13311
Ubuntu:25.10node-shell-quoteno fix listedUBUNTU-CVE-2026-13311
Ubuntu:26.10node-shell-quoteno fix listedUBUNTU-CVE-2026-13311
npmshell-quote1.9.0GHSA-395f-4hp3-45gv

Affected products (as reported)

VendorProductVersions
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