path-to-regexp outputs backtracking regular expressions
pillarjs path-to-regexp
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| path-to-regexp npm |
|
|
pillarjs path-to-regexp
| Product | Affected | Fixed in |
|---|---|---|
| path-to-regexp npm |
|
|
0.1.108.0.03.3.06.3.0path-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.
From the CVE record · GitHub_M
path-to-regexp can generate a slow regular expression when two parameters in one path segment are separated by something other than a period. Matching that expression can block JavaScript's event loop and cause a denial of service. The input does not specify whether exploitation requires network access, authentication, or user interaction.
Engineers using npm path-to-regexp should check installations in the listed affected ranges: <0.1.13, >=0.2.0 <1.9.0, >=7.0.0 <8.0.0, >=2.0.0 <3.3.0, or >=4.0.0 <6.3.0.