NewApp Monitoring is liveSign up free
AgentbeamBeta
Open-source package vulnerability · npm

CVE-2024-52798: path-to-regexp contains a ReDoS

highCVSS 4.0 7.7 · 3.1 7.5GHSA-rhx6-c78j-4q9w

Impact The regular expression that is vulnerable to backtracking can be generated in versions before 0.1.12 of path-to-regexp, originally reported in CVE-2024-45296 Patches Upgrade to 0.1.12. Workarounds Avoid using two parameters within a single path segment, when the separator is not . (e.g. no /:a-:b).

Published Dec 5, 2024 · Updated Jun 3, 2025

Affected packages

path-to-regexp

Ecosystem
npm
Affected
< 0.1.12
Fixed in
0.1.12
Check
npm ls path-to-regexp

Advisory details

From the GitHub Advisory Database (CC BY 4.0).

Impact

The regular expression that is vulnerable to backtracking can be generated in versions before 0.1.12 of path-to-regexp, originally reported in CVE-2024-45296

Patches

Upgrade to 0.1.12.

Workarounds

Avoid using two parameters within a single path segment, when the separator is not . (e.g. no /:a-:b). Alternatively, you can define the regex used for both parameters and ensure they do not overlap to allow backtracking.

References

  • https://github.com/advisories/GHSA-9wv6-86v2-598j
  • https://blakeembrey.com/posts/2024-09-web-redos/

Credited to blakeembrey, ctcpip, goshop4eva, dloetzke.

References

How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology

More npm vulnerabilities

All npm entries