{"id":"CVE-2026-13311","state":"PUBLISHED","title":"shell-quote parse() is quadratic in token count, enabling denial of service","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.","publishedAt":"2026-06-25T04:48:36.351Z","updatedAt":"2026-06-25T12:49:41.978Z","severity":{"score":8.7,"label":"High","version":"4.0","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","source":"harborist"},"assigner":"harborist","products":["ljharb shell-quote"],"affected":[{"vendor":"ljharb","product":"shell-quote","packageName":"shell-quote","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThanOrEqual":"1.8.4","versionType":"semver"}],"collectionURL":"https://www.npmjs.com/package"}],"references":["https://github.com/ljharb/shell-quote/security/advisories/GHSA-395f-4hp3-45gv","https://www.npmjs.com/package/shell-quote"],"weaknesses":["CWE-407"],"ingestedAt":"2026-10-29T20:11:00.674Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/13xxx/CVE-2026-13311.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-13311","state":"PUBLISHED","datePublished":"2026-06-25T04:48:36.351Z","dateUpdated":"2026-06-25T12:49:41.978Z","assignerShortName":"harborist","assignerOrgId":"7ffcee3d-2c14-4c3e-b844-86c6a321a158","dateReserved":"2026-06-25T04:39:03.579Z"},"containers":{"cna":{"title":"shell-quote parse() is quadratic in token count, enabling denial of service","descriptions":[{"lang":"en","value":"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":[{"vendor":"ljharb","product":"shell-quote","packageName":"shell-quote","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThanOrEqual":"1.8.4","versionType":"semver"}],"collectionURL":"https://www.npmjs.com/package"}],"references":[{"url":"https://github.com/ljharb/shell-quote/security/advisories/GHSA-395f-4hp3-45gv","name":"GHSA-395f-4hp3-45gv","tags":["vendor-advisory"]},{"url":"https://www.npmjs.com/package/shell-quote","tags":["product"]}],"metrics":[{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV4_0":{"attackVector":"NETWORK","attackComplexity":"LOW","attackRequirements":"NONE","privilegesRequired":"NONE","userInteraction":"NONE","vulnConfidentialityImpact":"NONE","subConfidentialityImpact":"NONE","vulnIntegrityImpact":"NONE","subIntegrityImpact":"NONE","vulnAvailabilityImpact":"HIGH","subAvailabilityImpact":"NONE","exploitMaturity":"NOT_DEFINED","Safety":"NOT_DEFINED","Automatable":"NOT_DEFINED","Recovery":"NOT_DEFINED","valueDensity":"NOT_DEFINED","vulnerabilityResponseEffort":"NOT_DEFINED","providerUrgency":"NOT_DEFINED","version":"4.0","baseSeverity":"HIGH","baseScore":8.7,"vectorString":"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"}},{"format":"CVSS","scenarios":[{"lang":"en","value":"GENERAL"}],"cvssV3_1":{"version":"3.1","attackVector":"NETWORK","attackComplexity":"LOW","privilegesRequired":"NONE","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"NONE","integrityImpact":"NONE","availabilityImpact":"HIGH","baseSeverity":"HIGH","baseScore":7.5,"vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"}}],"problemTypes":[{"descriptions":[{"cweId":"CWE-407","lang":"en","description":"CWE-407 Inefficient Algorithmic Complexity","type":"CWE"}]}],"providerMetadata":{"shortName":"harborist","orgId":"7ffcee3d-2c14-4c3e-b844-86c6a321a158","dateUpdated":"2026-06-25T04:48:36.351Z"},"impacts":[{"capecId":"CAPEC-130","descriptions":[{"lang":"en","value":"CAPEC-130 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)."}]}],"credits":[{"lang":"en","value":"bibu123456","type":"finder"},{"lang":"en","value":"Kayiz-PT","type":"coordinator"},{"lang":"en","value":"ljharb","type":"remediation developer"}]},"adp":[{"title":"CISA ADP Vulnrichment","references":[{"url":"https://github.com/ljharb/shell-quote/security/advisories/GHSA-395f-4hp3-45gv","tags":["exploit"]}],"metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-06-25T12:49:33.455269Z","id":"CVE-2026-13311","options":[{"Exploitation":"poc"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-06-25T12:49:41.978Z"}}]}}}