# CVE-2026-4867: path-to-regexp vulnerable to Regular Expression Denial of Service via multiple route parameters

> An attacker can cause a denial of service by triggering catastrophic backtracking in path-to-regexp when using three or more route parameters in a single segment.

- **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:** 26 Mar 2026
- **Also known as:** CLEANSTART-2026-QC14914, CLEANSTART-2026-TC19011, CLSA-2026-1777250311, CLSA-2026-1779238048, CLSA-2026-1792663862, CLSA-2026-1792789806, DEBIAN-CVE-2026-4867, ECHO-e0a1-0205-5555, MINI-4wr5-2rwj-j64r, MINI-67f8-6vcm-9cwr, MINI-6hx6-8q5c-hv7f, MINI-6p3h-7c67-3jpm, MINI-9c6m-2rq8-78h5, MINI-gwqj-92qf-vjq8, MINI-gxw2-wj86-9g99, MINI-hg9r-gp9r-q9gm, MINI-hq74-hr54-rc38, MINI-pw5h-m2w9-cpmr, MINI-vgc9-m7cx-6gj4, MINI-vxj4-q95g-23px, MINI-wv2w-xmc4-845r, MINI-xf7q-66rp-g929, ROOT-APP-NPM-CVE-2026-4867

## What is CVE-2026-4867?

CVE-2026-4867 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 three or more parameters within a single segment, separated by something that is not a period (.). For example, /:a-:b-:c or /:a-:b-:c-:d. The backtrack protection added in path-to-regexp@0.1.12 only prevents ambiguity for two parameters. With three or more, the generated lookahead does not block single separator characters, so capture groups overlap and cause catastrophic backtracking.

Patches:

Upgrade to path-to-regexp@0.1.13

Custom regex patterns in route definitions (e.g., /:a-:b([^-/]+)-:c([^-/]+)) are not affected because they override the default capture group.

Workarounds:

All versions can be patched by providing a custom regular expression for parameters after the first in a single segment. As long as the custom regular expression does not match the text before the parameter, you will be safe. For example, change /:a-:b-:c to /:a-:b([^-/]+)-:c([^-/]+).

If paths cannot be rewritten and versions cannot be upgraded, another alternative is to limit the URL length.

Weakness: CWE-1333 (Inefficient Regular Expression Complexity)

## Which versions are affected by CVE-2026-4867?

It affects 1 product.


Products: Pillarjs Path-to-Regexp.

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

Upgrade to a fixed version.

## Is CVE-2026-4867 being exploited?

There is no known exploitation of CVE-2026-4867 in the wild and no public exploit code.

## Other vulnerabilities in path-to-regexp

- [CVE-2026-4926](https://insights.sbomify.com/CVE-2026-4926/): path-to-regexp vulnerable to Denial of Service via sequential optional groups (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-4867 and fix it if it is affected.

What it is: CVE-2026-4867 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-4867 in the wild and no public exploit code.

Affected product: path-to-regexp. No package-level version data is available, so check the vendor advisory linked from the reference page.

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-4867/ (Markdown: https://insights.sbomify.com/CVE-2026-4867/index.md)
```

## Sources

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

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