cve.bz

CVE-2026-4867

7.5 highEPSS 0.5%

High (7.5) in pillarjs path-to-regexp. EPSS 0.5% chance of exploitation in the next 30 days. Fixed in path-to-regexp 0.1.10, 0.1.13, 1.9.0.

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.

Severity

CVSS 3.1

7.5 high
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
EPSS
0.5% chance of exploitation in the next 30 days; higher than 43% of CVEs (scores of 2026-10-31)
CWE
CWE-1333
Published
Modified
Record from
the NVD, synced

Affected

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-37ch-88jc-xwx2npmpath-to-regexp<0.1.130.1.13
GHSA-9wv6-86v2-598jnpmpath-to-regexp>=0.2.0 <1.9.01.9.0
GHSA-9wv6-86v2-598jnpmpath-to-regexp<0.1.100.1.10
GHSA-9wv6-86v2-598jnpmpath-to-regexp>=7.0.0 <8.0.08.0.0
GHSA-9wv6-86v2-598jnpmpath-to-regexp>=2.0.0 <3.3.03.3.0
GHSA-9wv6-86v2-598jnpmpath-to-regexp>=4.0.0 <6.3.06.3.0

References

Check your stackJSON