Quick answers
- Is CVE-2024-45296 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2024-45296 being exploited in the wild.
- How severe is CVE-2024-45296?
- Low severity, with a CVSS score of 3.1, published 9 September 2024.
- Which products and versions are affected?
- path-to-regexp (npm) SEMVER:introduced=0.2.0,fixed=1.9.0.
- Is there a fix for CVE-2024-45296?
- Yes. path-to-regexp (npm): upgrade to 1.9.0 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2024-45296 attacked?
- It is attacked over the network, in a software library.
- Am I affected by CVE-2024-45296?
- Check whether you run path-to-regexp (npm) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- path-to-regexp (npm): upgrade to 1.9.0 or later
npm install path-to-regexp@1.9.0
Technical details
The vulnerability is a Regular Expression Denial of Service (ReDoS) caused by inefficient regex patterns generated when multiple parameters are separated by non-period characters within a single URL segment. Path patterns like /:a-:b generate regex like /^\/([^\/]+?)-([^\/]+?)\/?$/, which exhibits catastrophic backtracking. An attacker can exploit this by crafting a URL such as /a{'-a'.repeat(8000)}/a that triggers exponential regex backtracking. Since JavaScript regex matching runs on the main thread, this blocks the event loop and causes severe latency degradation (up to 1000x performance penalty). Patches are available in versions 0.1.10, 1.9.0, 3.3.0, 6.3.0, and 8.0.0; version 8.0.0 removes the vulnerable features entirely.
Affected products
- pillarjs path-to-regexp <0.1.10, >=0.2.0 <1.9.0, >=2.0.0 <3.3.0, >=4.0.0 <6.3.0, >=7.0.0 <8.0.0
Identifiers
- CVE-2024-45296
- CVE-2026-4867
- GHSA-9wv6-86v2-598j
Timeline
- 2024-09-09: disclosed: Advisory published