CVE-2024-52798
path-to-regexp: path-to-regexp Unpatched `path-to-regexp` ReDoS in 0.1.x
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · December 6, 2024
Updated · October 31, 2026
Description
A flaw was found in path-to-regexp. A path-to-regexp turns path strings into regular expressions. In certain cases, path-to-regexp will output a regular expression that can be exploited to cause poor performance.
Statement
This vulnerability exists because of an incomplete fix for CVE-2024-45296.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
Avoid using two parameters within a single path segment when the separator is not, for example, /:a-:b. Alternatively, you can define the regex used for both parameters and ensure they do not overlap to allow backtracking.
CVSS / CWE
CVSS 3.1 · 5.3CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L
CWE-1333 · Inefficient Regular Expression Complexity