Impact
The path-to-regexp library constructs a regular expression that becomes vulnerable when three or more dynamic parameters are present in a single path segment separated by non‑dot characters. In such cases, the generated lookahead does not block single separator characters, causing capture groups to overlap and trigger catastrophic backtracking during URL matching. An attacker can exploit this by sending a request URL containing many characters, leading the server to expend excessive CPU resources and become unresponsive, thereby impacting application availability.
Affected Systems
The affected library is the path-to-regexp npm package. Versions up to and including 0.1.12 generate the problematic regular expression. Applications that import this package and use route patterns with three or more dynamic parameters in a single segment—without custom regex overrides—are at risk.
Risk and Exploitability
The CVSS score of 7.5 classifies this issue as high severity, indicating significant potential for service disruption. The EPSS score is not provided, so the likelihood of exploitation is uncertain, yet the attack does not require special privileges; any user able to craft a request can trigger the denial of service. This vulnerability is not listed in the CISA KEV catalog. Adopting the fix or a mitigating workaround quickly reduces the risk to application availability.
OpenCVE Enrichment
Github GHSA