CVE-2026-13311: CWE-407 Inefficient Algorithmic Complexity in ljharb shell-quote
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.
AI Analysis
Technical Summary
The ljharb shell-quote library versions up to 1.8.4 contain an inefficient algorithmic complexity issue (CWE-407) in the parse() function. The function finalizes parsed tokens using Array.prototype.concat as a reduce accumulator, which reallocates and copies the entire growing array on each iteration, resulting in O(n^2) time complexity relative to input size. An attacker supplying a crafted string with space-separated tokens can cause the single-threaded Node.js event loop to be blocked for an extended period, causing a denial of service. No shell metacharacters are required for exploitation. The vulnerability impacts availability only and is fixed in version 1.8.5.
Potential Impact
This vulnerability allows an attacker to cause a denial of service by blocking the Node.js event loop with a crafted input string, impacting application availability. There is no risk of code execution or data disclosure. The severity is high due to the potential for service disruption.
Mitigation Recommendations
A fix is available in ljharb shell-quote version 1.8.5. Users should upgrade to version 1.8.5 or later to remediate this vulnerability. No other mitigation is indicated.
CVE-2026-13311: CWE-407 Inefficient Algorithmic Complexity in ljharb shell-quote
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.
CVSS v4.0
Score 8.7high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
Weaknesses
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The ljharb shell-quote library versions up to 1.8.4 contain an inefficient algorithmic complexity issue (CWE-407) in the parse() function. The function finalizes parsed tokens using Array.prototype.concat as a reduce accumulator, which reallocates and copies the entire growing array on each iteration, resulting in O(n^2) time complexity relative to input size. An attacker supplying a crafted string with space-separated tokens can cause the single-threaded Node.js event loop to be blocked for an extended period, causing a denial of service. No shell metacharacters are required for exploitation. The vulnerability impacts availability only and is fixed in version 1.8.5.
Potential Impact
This vulnerability allows an attacker to cause a denial of service by blocking the Node.js event loop with a crafted input string, impacting application availability. There is no risk of code execution or data disclosure. The severity is high due to the potential for service disruption.
Mitigation Recommendations
A fix is available in ljharb shell-quote version 1.8.5. Users should upgrade to version 1.8.5 or later to remediate this vulnerability. No other mitigation is indicated.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- harborist
- Date Reserved
- 2026-06-25T04:39:03.579Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a3cbd214853345fc16627b6
Added to database: 06/25/2026, 05:31:13 UTC
Last enriched: 06/25/2026, 05:45:52 UTC
Last updated: 08/09/2026, 00:41:12 UTC
Views: 180
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.