Vulnerability · Published Mar 26, 2026 · Assigned by openjs

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

High 7.5

In plain English

A high-severity regular-expression denial of service in path-to-regexp from path-to-regexp. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 0.5% (higher than 44% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)7.5High
Exploit odds (30 days)0.5%top 55.9% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Debian:12node-path-to-regexp1.0.1-1DEBIAN-CVE-2026-4867
Debian:13node-path-to-regexp1.0.1-1DEBIAN-CVE-2026-4867
Debian:14node-path-to-regexp1.0.1-1DEBIAN-CVE-2026-4867
npmpath-to-regexp8.0.0GHSA-9wv6-86v2-598j
npmpath-to-regexp0.1.13GHSA-37ch-88jc-xwx2
npmpath-to-regexp6.3.0GHSA-9wv6-86v2-598j
npmpath-to-regexp3.3.0GHSA-9wv6-86v2-598j
npmpath-to-regexp1.9.0GHSA-9wv6-86v2-598j
npmpath-to-regexp0.1.10GHSA-9wv6-86v2-598j

Affected products (as reported)

VendorProductVersions
path-to-regexp path-to-regexp 0 – before 0.1.13

Weakness: CWE-1333 · Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

References