{"id":"CVE-2026-13311","published":"2026-06-25T04:48:36Z","modified":"2026-06-25T12:49:41Z","title":"shell-quote parse() is quadratic in token count, enabling denial of service","vendor":"ljharb","product":"shell-quote","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":7.5,"severity":"HIGH","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00672,"percentile":0.4712,"provenance":"source"},"cwes":[{"id":"CWE-407","name":"Inefficient Algorithmic Complexity"}],"references":[{"url":"https://github.com/ljharb/shell-quote/security/advisories/GHSA-395f-4hp3-45gv","tags":["vendor-advisory"]},{"url":"https://www.npmjs.com/package/shell-quote","tags":["product"]}],"priority":{"score":14.7,"factors":[{"name":"EPSS percentile","points":9.42},{"name":"CVSS severity","points":5.25}]},"vendorSlug":"ljharb","affectedVersions":[{"vendor":"ljharb","product":"shell-quote","versions":["<= 1.8.4"]}],"capec":[{"id":"CAPEC-130","name":"Excessive Allocation - a small crafted input forces parse() into quadratic-time work, exhausting CPU and blocking the single-threaded Node.js event loop, resulting in denial of service (availability only)."}],"ssvc":{"exploitation":"poc","automatable":"yes","technicalImpact":"partial","timestamp":"2026-06-25T12:49:33.455269Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"shell-quote","vulnerableRanges":["<1.9.0"],"patched":["1.9.0"],"from":["GHSA-395f-4hp3-45gv"],"provenance":"source"}],"summary":{"text":"The shell-quote npm package, prior to version 1.8.5, has an algorithmic complexity flaw in its parse() function, which takes time that grows quadratically with the number of input tokens because the token array is repeatedly reallocated and copied during finalization. An attacker who can supply a string to any code path that calls parse() can block the single-threaded Node.js event loop for an extended period with a small, unauthenticated, network-reachable input of plain space-separated words, requiring no shell metacharacters or user interaction, with the impact limited to denial of service.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T21:54:42Z"},"euvd":{"id":"EUVD-2026-39180","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2016-10541","published":"2018-05-31","fixed":"1.6.1","kev":false},{"cve":"CVE-2021-42740","published":"2021-10-21","fixed":"1.7.3","kev":false},{"cve":"CVE-2026-9277","published":"2026-05-22","fixed":"1.8.4","kev":false,"link":{"from":"CVE-2026-9277","to":"CVE-2026-13311","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:shell-quote","fromFixed":"1.8.4","toFixed":"1.9.0","daysApart":34}]}},{"cve":"CVE-2026-13311","published":"2026-06-25","fixed":"1.9.0","kev":false},{"cve":"CVE-2026-102422","published":"2026-09-29","fixed":"1.11.0","kev":false,"link":{"from":"CVE-2026-13311","to":"CVE-2026-102422","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:shell-quote","fromFixed":"1.9.0","toFixed":"1.11.0","daysApart":96}]}}],"package":"npm:shell-quote"}}