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

High 7.5 Published Updated

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.

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-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 [email protected] 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 [email protected]

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

Which versions are affected by CVE-2026-4867?

It affects 1 product.

Products include Pillarjs Path-to-Regexp.

How do I fix CVE-2026-4867?

Upgrade to a fixed version.

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-4867 being exploited?

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

Sources

Also known as CLEANSTART-2026-QC14914, CLEANSTART-2026-TC19011, CLSA-2026-1777250311, CLSA-2026-1779238048, CLSA-2026-1792663862, CLSA-2026-1792789806 and 17 more.

Is CVE-2026-4867 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free