Skip to content

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

HighCVSS 7.5 EPSS 0.93%
Published
Updated
Exploit status
No public exploit known

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.

Affected products

ProductAffected versionsFixed in
Microsoft cbl mariner < 3.1.1-13 3.1.1-13
npm path-to-regexp(npm) < 0.1.10 0.1.10
npm path-to-regexp(npm) >= 0.2.0, < 1.9.0 1.9.0
npm path-to-regexp(npm) >= 2.0.0, < 3.3.0 3.3.0
npm path-to-regexp(npm) >= 7.0.0, < 8.0.0 8.0.0
npm path-to-regexp(npm) >= 4.0.0, < 6.3.0 6.3.0
debian/node-path-to-regexp(Debian:12) All versions No fix listed
debian/node-path-to-regexp(Debian:12) = 6.2.1-1 No fix listed
debian/node-path-to-regexp(Debian:12) = 6.3.0-1 No fix listed
debian/node-path-to-regexp(Debian:12) = 8.3.0-1 No fix listed
debian/node-path-to-regexp(Debian:12) = 8.4.0-1 No fix listed
debian/node-path-to-regexp(Debian:12) = 8.4.1-1 No fix listed
debian/node-path-to-regexp(Debian:12) = 8.4.2-1 No fix listed
debian/node-path-to-regexp(Debian:13) < 6.3.0-1 6.3.0-1
debian/node-path-to-regexp(Debian:14) < 6.3.0-1 6.3.0-1
ubuntu/node-path-to-regexp(Ubuntu:22.04) < 6.2.0-2ubuntu0.1~esm1 6.2.0-2ubuntu0.1~esm1
pillarjs path-to-regexp = < 0.1.10 No fix listed
pillarjs path-to-regexp = >= 0.2.0, < 8.0.0 No fix listed
pillarjs path-to-regexp < 0.1.0 0.1.0
pillarjs path-to-regexp >= 0.2.0, < 8.0.0 8.0.0
ubuntu/node-path-to-regexp(Ubuntu:24.04) < 6.2.1-1ubuntu0.1~esm1 6.2.1-1ubuntu0.1~esm1
ubuntu/node-express(Ubuntu:26.04) All versions No fix listed
ubuntu/node-express(Ubuntu:26.10) All versions No fix listed

References