CVE-2026-4926 path-to-regexp vulnerable to Denial of Service via sequential optional groups
Attackers can cause denial of service by triggering exponential regex growth in path-to-regexp via sequential optional groups.
- Exploited in the wild
- Not known
- Login needed
- Not needed
- Attackable
- Over the internet
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2026-4926?
CVE-2026-4926 is a high-severity denial of service vulnerability in path-to-regexp, published on 26 Mar 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Official description
Impact:
A bad regular expression is generated any time you have multiple sequential optional groups (curly brace syntax), such as `{a}{b}{c}:z`. The generated regex grows exponentially with the number of groups, causing denial of service.
Patches:
Fixed in version 8.4.0.
Workarounds:
Limit the number of sequential optional groups in route patterns. Avoid passing user-controlled input as route patterns.
Which versions are affected by CVE-2026-4926?
2 open source packages ship an affected version, including path-to-regexp. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
path-to-regexp npm | From 8.0.0 | 8.4.0 |
path-to-regexp npm | From 8.0.0 | 8.4.0 |
Products include Pillarjs Path-to-Regexp.
How do I fix CVE-2026-4926?
Upgrade path-to-regexp to 8.4.0 or later.
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-2026-4926 being exploited?
There is no known exploitation of CVE-2026-4926 in the wild and no public exploit code.
Other vulnerabilities in path-to-regexp
Sources
Also known as CLEANSTART-2026-SQ74175, CLEANSTART-2026-VD42799, DEBIAN-CVE-2026-4926, ECHO-9ff9-3f52-fbaa, GHSA-j3q9-mxjg-w52f, MINI-22q9-x836-pwjx and 14 more.