7.7high
path-to-regexp Unpatched `path-to-regexp` ReDoS in 0.1.x
- Severity
- 7.7high CVSS:4.0 by GitHub_M
- Exploit likelihood
- 0.79% (higher than 57% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-rhx6-c78j-4q9w
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.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| pillarjs path-to-regexp | < 0.1.12, before 0.1.12 | CVE List |
| path-to-regexp (npm) | before 0.1.12 | GitHub Advisory Database |
All scores
| GitHub_M | 7.7high CVSS:4.0 | 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 |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | high CVSS:4.0 | 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 |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
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
NVD (es)
path-to-regexp convierte las cadenas de ruta en expresiones regulares. En ciertos casos, path-to-regexp generará una expresión regular que puede aprovecharse para provocar un rendimiento deficiente. La expresión regular vulnerable al retroceso se puede generar en la versión 0.1.x de path-to-regexp. Actualice a la versión 0.1.12. Esta vulnerabilidad existe debido a una corrección incompleta de CVE-2024-45296.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-52798 changed 2025-01-24 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-rhx6-c78j-4q9w changed 2026-09-10 | CC-BY-4.0 |
| NVD | CVE-2024-52798 changed 2026-06-17 | Public domain |