# 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.

- **Severity:** High 7.5 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 26 Mar 2026
- **Updated:** 17 Sep 2026
- **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, MINI-2g39-g3m7-2f6v, MINI-3836-phfh-cxwr, MINI-3vgm-fx6q-75g9, MINI-3xxc-fppr-h424, MINI-52rh-rxcv-w42m, MINI-5mmq-854p-4mpr, MINI-6rpq-r774-c2rv, MINI-9ww4-g39r-r7jv, MINI-cfrj-56rf-mfvf, MINI-fxv9-f25c-5wgq, MINI-mg32-6mcr-m73g, MINI-pf52-g95p-crr9, MINI-vjxh-jmx2-hmmg, ROOT-APP-NPM-CVE-2026-4926

## 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.

Weakness: CWE-400 (Uncontrolled Resource Consumption), CWE-1333 (Inefficient Regular Expression Complexity)

## 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 | Ecosystem | 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: Pillarjs Path-to-Regexp.

## How do I fix CVE-2026-4926?

Upgrade path-to-regexp to 8.4.0 or later.

## 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

- [CVE-2026-4867](https://insights.sbomify.com/CVE-2026-4867/): path-to-regexp vulnerable to Regular Expression Denial of Service via multiple route parameters (high 7.5)
- [CVE-2026-4923](https://insights.sbomify.com/CVE-2026-4923/): path-to-regexp vulnerable to Regular Expression Denial of Service via multiple wildcards (medium 5.9)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2026-4926 and fix it if it is affected.

What it is: 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.
Exploitation: There is no known exploitation of CVE-2026-4926 in the wild and no public exploit code.

Affected packages and fixed versions:
- path-to-regexp (npm): affected from 8.0.0; fixed in 8.4.0
- path-to-regexp (npm): affected from 8.0.0; fixed in 8.4.0

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2026-4926/ (Markdown: https://insights.sbomify.com/CVE-2026-4926/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2026-4926
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2026-4926
- OSV: https://osv.dev/vulnerability/CVE-2026-4926

---
From sbomify Insights: https://insights.sbomify.com/CVE-2026-4926/
Summaries are generated and may contain mistakes; the official description above is the record.
