{"id":"CVE-2026-4867","state":"PUBLISHED","title":"path-to-regexp vulnerable to Regular Expression Denial of Service via multiple route parameters","description":"Impact:\n\nA bad regular expression is generated any time you have three or more parameters within a single segment, separated by something that is not a period (.). For example, /:a-:b-:c or /:a-:b-:c-:d. The backtrack protection added in path-to-regexp@0.1.12 only prevents ambiguity for two parameters. With three or more, the generated lookahead does not block single separator characters, so capture groups overlap and cause catastrophic backtracking.\n\nPatches:\n\nUpgrade to path-to-regexp@0.1.13\n\nCustom regex patterns in route definitions (e.g., /:a-:b([^-/]+)-:c([^-/]+)) are not affected because they override the default capture group.\n\nWorkarounds:\n\nAll versions can be patched by providing a custom regular expression for parameters after the first in a single segment. As long as the custom regular expression does not match the text before the parameter, you will be safe. For example, change /:a-:b-:c to /:a-:b([^-/]+)-:c([^-/]+).\n\nIf paths cannot be rewritten and versions cannot be upgraded, another alternative is to limit the URL length.","publishedAt":"2026-03-26T16:16:25.501Z","updatedAt":"2026-03-26T16:52:14.893Z","severity":{"score":7.5,"label":"High","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","source":"openjs"},"assigner":"openjs","products":["path-to-regexp path-to-regexp"],"affected":[{"vendor":"path-to-regexp","product":"path-to-regexp","packageURL":"pkg:npm/path-to-regexp","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"0.1.13","versionType":"semver"}]}],"references":["https://github.com/advisories/GHSA-9wv6-86v2-598j","https://blakeembrey.com/posts/2024-09-web-redos","https://cna.openjsf.org/security-advisories.html"],"weaknesses":["CWE-1333"],"ingestedAt":"2026-10-29T20:12:16.098Z","source":{"repository":"CVEProject/cvelistV5","path":"cves/2026/4xxx/CVE-2026-4867.json","commit":"556c9d3a8cd17e218bb8e452ba7cd619a384ff47"},"raw":{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-4867","state":"PUBLISHED","datePublished":"2026-03-26T16:16:25.501Z","dateUpdated":"2026-03-26T16:52:14.893Z","assignerShortName":"openjs","assignerOrgId":"ce714d77-add3-4f53-aff5-83d477b104bb","dateReserved":"2026-03-25T20:11:53.714Z"},"containers":{"cna":{"title":"path-to-regexp vulnerable to Regular Expression Denial of Service via multiple route parameters","descriptions":[{"lang":"en","value":"Impact:\n\nA bad regular expression is generated any time you have three or more parameters within a single segment, separated by something that is not a period (.). For example, /:a-:b-:c or /:a-:b-:c-:d. The backtrack protection added in path-to-regexp@0.1.12 only prevents ambiguity for two parameters. With three or more, the generated lookahead does not block single separator characters, so capture groups overlap and cause catastrophic backtracking.\n\nPatches:\n\nUpgrade to path-to-regexp@0.1.13\n\nCustom regex patterns in route definitions (e.g., /:a-:b([^-/]+)-:c([^-/]+)) are not affected because they override the default capture group.\n\nWorkarounds:\n\nAll versions can be patched by providing a custom regular expression for parameters after the first in a single segment. As long as the custom regular expression does not match the text before the parameter, you will be safe. For example, change /:a-:b-:c to /:a-:b([^-/]+)-:c([^-/]+).\n\nIf paths cannot be rewritten and versions cannot be upgraded, another alternative is to limit the URL length."}],"affected":[{"vendor":"path-to-regexp","product":"path-to-regexp","packageURL":"pkg:npm/path-to-regexp","defaultStatus":"unaffected","versions":[{"version":"0","status":"affected","lessThan":"0.1.13","versionType":"semver"}]}],"references":[{"url":"https://github.com/advisories/GHSA-9wv6-86v2-598j"},{"url":"https://blakeembrey.com/posts/2024-09-web-redos"},{"url":"https://cna.openjsf.org/security-advisories.html"}],"metrics":[{"format":"CVSS","cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H","baseScore":7.5,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"GENERAL"}]}],"problemTypes":[{"descriptions":[{"cweId":"CWE-1333","lang":"en","description":"CWE-1333: Inefficient Regular Expression Complexity","type":"CWE"}]}],"providerMetadata":{"shortName":"openjs","orgId":"ce714d77-add3-4f53-aff5-83d477b104bb","dateUpdated":"2026-03-26T16:16:25.501Z"},"credits":[{"lang":"en","type":"reporter","value":"EthanKim88"},{"lang":"en","type":"remediation developer","value":"blakeembrey"},{"lang":"en","type":"remediation reviewer","value":"UlisesGascon"}],"x_generator":{"engine":"cve-kit 1.0.0"}},"adp":[{"title":"CISA ADP Vulnrichment","metrics":[{"other":{"type":"ssvc","content":{"timestamp":"2026-03-26T16:52:08.810671Z","id":"CVE-2026-4867","options":[{"Exploitation":"none"},{"Automatable":"yes"},{"Technical Impact":"partial"}],"role":"CISA Coordinator","version":"2.0.3"}}}],"providerMetadata":{"shortName":"CISA-ADP","orgId":"134c704f-9b21-4f2e-91b3-4a467353bcc0","dateUpdated":"2026-03-26T16:52:14.893Z"}}]}}}