path-to-regexp vulnerable to Denial of Service via sequential optional groups
- Severity:
- High
Description
A bad regular expression is generated any time you have multiple sequential optional groups (curly brace syntax), such as {a}{b}{c}:z. The generated regex grows exponentially with the number of groups, causing denial of service.
Recommendation
Update the path-to-regexp package to the latest compatible version. Followings are version details:
- Affected version(s): >= 8.0.0, < 8.4.0
- Patched version(s): 8.4.0
References
Related Issues
- path-to-regexp vulnerable to Regular Expression Denial of Service via multiple wildcards - CVE-2026-4923
- path-to-regexp vulnerable to Regular Expression Denial of Service via multiple route parameters - CVE-2026-4867
- Marked Vulnerable to OOM Denial of Service via Infinite Recursion in marked Tokenizer - CVE-2026-41680
- jsPDF Vulnerable to Denial of Service (DoS) via Unvalidated BMP Dimensions in BMPDecoder - CVE-2026-24133
You might also like:
- Tags:
- npm
- path-to-regexp
Anything's wrong? Let us know Last updated on March 27, 2026


