Path To RegexpApplication · Pillarjs

CVE-2026-4867

HIGH · 7.5 CVSS v3.1 Published 2026-03-26
Fix available
A fix is available. Upgrade to 0.1.13 or later.
See remediation →
84/100
Remediation priority · High
Remotely reachable No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

This is a Regular Expression Denial of Service (ReDoS) vulnerability in path-to-regexp versions prior to 0.1.13. When three or more path parameters are defined in a single segment without periods (e.g., /:a-:b-:c), the generated regex includes incomplete backtrack protection that fails to prevent overlapping capture groups, leading to catastrophic backtracking when the regex engine processes certain input strings.

MitigationUpgrade path-to-regexp to version 0.1.13 or later, or apply custom regex patterns to parameters after the first in affected route segments (e.g., /:a-:b([^-/]+)-:c([^-/]+)).

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
Path To RegexpApplication
Affected:< 0.1.13

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
None
Integrity
None
Availability
High

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Check installed path-to-regexp version
    Run `npm list path-to-regexp` or check package.json for the path-to-regexp dependency version
    Affected if Version is less than 0.1.13
  2. Locate route definitions using path-to-regexp
    Search source code for calls to `pathToRegexp`, `compile`, or similar path-to-regexp functions, and examine the route pattern strings passed to them
    Affected if Routes contain patterns with three or more path parameters in a single segment (e.g., /:a-:b-:c) without periods separating them
  3. Identify vulnerable parameter patterns
    Look for route patterns where parameters are concatenated without delimiters, such as /:param1:param2:param3 or /:a-:b-:c
    Affected if Any route pattern has three or more unseparated path parameters like /:a-:b-:c
  4. Verify the route is active and receiving input
    Check application logs, routing configuration, or test if the route handler is reachable and processes user input
    Affected if The vulnerable route pattern is actively mounted and can receive HTTP requests

You are affected if path-to-regexp version is below 0.1.13 AND your application uses routes with three or more path parameters in a single segment without delimiters.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 0.1.13 or later
Fixed in 0.1.13
Interim mitigation

Upgrade path-to-regexp to version 0.1.13 or later, or apply custom regex patterns to parameters after the first in affected route segments (e.g., /:a-:b([^-/]+)-:c([^-/]+)).

Recommended fix High confidence

[email protected]

  1. Identify all project dependencies that use path-to-regexp (e.g., direct dependency or transitive dependency through Express, Koa, etc.)
  2. Update the path-to-regexp dependency in package.json to version 0.1.13 or higher
  3. Run 'npm install' or 'yarn install' to download the updated package
  4. Verify the installed version by checking node_modules/path-to-regexp/package.json
  5. Test all routes that use path patterns with 3+ parameters in a single segment (e.g., /:a-:b-:c) to ensure they still function correctly
  6. If using a package manager lockfile, commit the updated lockfile
Caveat Minor version upgrades typically have low risk of breaking changes, but test thoroughly as with any dependency update

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Path To Regexp Scoped from the published advisory
  • Consultation2.0 h
  • Implementation3.0 h
  • Testing2.0 h
  • Review / QA1.0 h
8.0 hours of engineering $1,420
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $2,272.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2026-4867 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2026-4867 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data