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

- Severity: High 8.7 (CVSS:4.0, scored by harborist) `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`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.41%, higher than 36% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-06-25T04:48:36.351Z
- Modified: 2026-10-25T23:10:00.167Z
- Also known as: GHSA-395f-4hp3-45gv
- Weaknesses: CWE-407
- SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial
- Assigned by: harborist

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

(As written by CVE List.)

## Affected

- shell-quote: up to 1.8.4
- shell-quote (npm): before 1.9.0
- shell-quote_project shell-quote: before 1.9.0

## Every score

- harborist: CVSS:4.0 8.7 High `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`
- harborist: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:3.1 7.5 High `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`
- GitHub: CVSS:4.0 High `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`

## References

- <https://github.com/ljharb/shell-quote/security/advisories/GHSA-395f-4hp3-45gv> (exploit, vendor-advisory, web)
- <https://www.npmjs.com/package/shell-quote> (product, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-13311> (advisory)
- <https://github.com/ljharb/shell-quote/commit/7ff5488599d01c323514f02f5efb74088dd134ec> (web)
- <https://github.com/ljharb/shell-quote> (package)
- <https://github.com/ljharb/shell-quote/releases/tag/v1.9.0> (web)

## Sources

- CVE List: [CVE-2026-13311](https://www.cve.org/CVERecord?id=CVE-2026-13311), CVE Terms of Use, modified 2026-06-25
- GitHub Advisory Database: [GHSA-395f-4hp3-45gv](https://github.com/advisories/GHSA-395f-4hp3-45gv), CC-BY-4.0, modified 2026-09-10
- NVD: [CVE-2026-13311](https://nvd.nist.gov/vuln/detail/CVE-2026-13311), Public domain, modified 2026-10-25

---

Page: https://cve.day/CVE-2026-13311 · Whole record: https://cve.day/CVE-2026-13311.json · Rebuilt by cve.day 2026-11-25T22:59:25.803Z
