path-to-regexp vulnerable to Regular Expression Denial of Service via multiple wildcards
- Severity:
- Medium
Description
When using multiple wildcards, combined with at least one parameter, a regular expression can be generated that is vulnerable to ReDoS. This backtracking vulnerability requires the second wildcard to be somewhere other than the end of the path.
Unsafe examples:
Safe examples:
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
- GHSA-27v5-c462-wpq7
- cna.openjsf.org
- makenowjust-labs.github.io
- CVE-2026-4923
- CWE-1333
- CAPEC-310
- OWASP 2021-A6
Related Issues
- path-to-regexp vulnerable to Regular Expression Denial of Service via multiple route parameters - CVE-2026-4867
- path-to-regexp vulnerable to Denial of Service via sequential optional groups - CVE-2026-4926
- angular vulnerable to regular expression denial of service via the angular.copy() utility - CVE-2023-26116
- angular vulnerable to regular expression denial of service via the $resource service - CVE-2023-26117
You might also like:
- Tags:
- npm
- path-to-regexp
Anything's wrong? Let us know Last updated on March 27, 2026


