Live threats

All CVEs / Pillarjs

CVE-2026-4867Pillarjs Path-to-regexp

High 7.5 No auth needed

Priority
60
CVSS 3.1
7.5
EPSS
—
Auth required
No
Published
Mar 26, 2026
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-1333
SSVC (CISA)
Exploitation: none · Automatable: yes · Technical impact: partial
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for Path-to-regexp.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
npm path-to-regexp < 0.1.13 0.1.13 npm install path-to-regexp@0.1.13
npm path-to-regexp ≥ 0.2.0 < 1.9.0 1.9.0 npm install path-to-regexp@1.9.0
npm path-to-regexp < 0.1.10 0.1.10 npm install path-to-regexp@0.1.10
npm path-to-regexp ≥ 7.0.0 < 8.0.0 8.0.0 npm install path-to-regexp@8.0.0
npm path-to-regexp ≥ 2.0.0 < 3.3.0 3.3.0 npm install path-to-regexp@3.3.0
npm path-to-regexp ≥ 4.0.0 < 6.3.0 6.3.0 npm install path-to-regexp@6.3.0

Per OSV / GitHub Advisories (GHSA-37ch-88jc-xwx2, GHSA-9wv6-86v2-598j). Check the version in your lockfile before upgrading.

Affected products (CPE)

VendorProductVersions
pillarjspath-to-regexp< 0.1.13

Official sources

References

Links published by the sources. Open them with care.