CVE-2026-4867
Impact: A 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 [email protected] 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. Patches: Upgrade to [email protected] Custom regex patterns in route definitions (e.g., /:a-:b([^-/]+)-:c([^-/]+)) are not affected because they override the default capture group. Workarounds: All 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([^-/]+). If paths cannot be rewritten and versions cannot be upgraded, another alternative is to limit the URL length.
Scoring
- Severity
- HIGH
- CVSS base score
- 7.5
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
- EPSS probability
- 0.50%
- CWE
- CWE-1333
- Published
- 2026-03-26
- Last modified
- 2026-03-26
Affected products
- path-to-regexp path-to-regexp
Weakness type
Related vulnerabilities
- CVE-2026-75880 — Apache Artemis, Apache ActiveMQ Artemis: Message selector wildcard handling could lead to denial of service
- CVE-2026-87819 — GitPython before 3.1.60 Denial of Service via ReDoS
- CVE-2026-86081 — n8n: Regular Expression Denial of Service in the Default Blocked-File-Pattern Match via a Git Node Clone Path
- CVE-2026-85062 — Colord: Slow rejection of oversized malformed color strings
- CVE-2026-83619 — xmldom: End-tag Whitespace-Trim Regex ReDoS — quadratic backtracking in the 0.8.x end-tag parser
- CVE-2026-83606 — xmldom PI grammar regex ReDoS: quadratic backtracking on unterminated processing instructions
- CVE-2024-58379 — nodemailer before 6.9.9 ReDoS via attachDataUrls parameter
- CVE-2026-55520 — Protego: Exponential backtracking ReDoS in robots.txt URL wildcard matching