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

Published Dec 5, 2024
·
Updated

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/

Other sources

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.

MITRE

Affected Software

3 affected componentsFixes available
npm/path-to-regexp<0.1.12
0.1.12
IBM Controller<=11.1.0 - 11.1.1
IBM Cognos Controller<=11.0.0 - 11.0.1 FP6

Event History

Dec 5, 2024
Advisory Published
via GitHub·10:40 PM
CVE Published
via MITRE·10:45 PM
Data Sourced
via MITRE·10:45 PM
DescriptionWeakness
Data Sourced
via Red Hat·11:01 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·11:15 PM
DescriptionSeverityWeakness
Dec 4, 2025
Data Sourced
via IBM·12:00 AM
DescriptionAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the severity of CVE-2024-52798?

CVE-2024-52798 has a moderate severity due to the potential for Denial of Service from backtracking in regular expressions.

2

How do I fix CVE-2024-52798?

To fix CVE-2024-52798, upgrade the 'path-to-regexp' package to version 0.1.12 or later.

3

What software is affected by CVE-2024-52798?

CVE-2024-52798 affects versions before 0.1.12 of the 'path-to-regexp' package.

4

What is the cause of CVE-2024-52798?

CVE-2024-52798 is caused by a vulnerable regular expression that allows for excessive backtracking.

5

Are there workarounds for CVE-2024-52798?

As a workaround for CVE-2024-52798, avoid using two parameters within a single path segment.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203