CVE-2024-45296 path-to-regexp outputs backtracking regular expressions

High 7.5 Published Updated

Attackers can cause denial of service by triggering inefficient regular expression backtracking in the path-to-regexp library.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-45296?

CVE-2024-45296 is a high-severity denial of service vulnerability in pillarjs path-to-regexp, published on 9 Sep 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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. Because JavaScript is single threaded and regex matching runs on the main thread, poor performance will block the event loop and lead to a DoS. The bad regular expression is generated any time you have two parameters within a single segment, separated by something that is not a period (.). For users of 0.1, upgrade to 0.1.10. All other users should upgrade to 8.0.0.

Weakness: CWE-1333

Which versions are affected by CVE-2024-45296?

Linux distribution packages (1)
argocd-cli openSUSE:TumbleweedAll versions2.12.4-1.1

How do I fix CVE-2024-45296?

Upgrade to a fixed version.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2024-45296 being exploited?

There is no known exploitation of CVE-2024-45296 in the wild and no public exploit code.

Sources

Also known as AZL-49085, AZL-49103, AZL-49117, AZL-49158, AZL-49161, CLEANSTART-2026-DG43720 and 12 more.

Is CVE-2024-45296 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free