Skip to content

🚨 [security] Update path-to-regexp 8.2.0 → 8.4.0 (minor)#600

Closed
depfu[bot] wants to merge 1 commit intomainfrom
depfu/update/pnpm/path-to-regexp-8.4.0
Closed

🚨 [security] Update path-to-regexp 8.2.0 → 8.4.0 (minor)#600
depfu[bot] wants to merge 1 commit intomainfrom
depfu/update/pnpm/path-to-regexp-8.4.0

Conversation

@depfu
Copy link
Copy Markdown
Contributor

@depfu depfu bot commented Mar 28, 2026


🚨 Your current dependencies have known security vulnerabilities 🚨

This dependency update fixes known security vulnerabilities. Please see the details below and assess their impact carefully. We recommend to merge and deploy this as soon as possible!


Here is everything you need to know about this update. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ path-to-regexp (8.2.0 → 8.4.0) · Repo · Changelog

Security Advisories 🚨

🚨 path-to-regexp vulnerable to Denial of Service via sequential optional groups

Impact

A bad regular expression is generated any time you have multiple sequential optional groups (curly brace syntax), such as {a}{b}{c}:z. The generated regex grows exponentially with the number of groups, causing denial of service.

Patches

Fixed in version 8.4.0.

Workarounds

Limit the number of sequential optional groups in route patterns. Avoid passing user-controlled input as route patterns.

🚨 path-to-regexp vulnerable to Regular Expression Denial of Service via multiple wildcards

Impact

When using multiple wildcards, combined with at least one parameter, a regular expression can be generated that is vulnerable to ReDoS. This backtracking vulnerability requires the second wildcard to be somewhere other than the end of the path.

Unsafe examples:

/*foo-*bar-:baz
/*a-:b-*c-:d
/x/*a-:b/*c/y

Safe examples:

/*foo-:bar
/*foo-:bar-*baz

Patches

Upgrade to version 8.4.0.

Workarounds

If developers are using multiple wildcard parameters, they can check the regex output with a tool such as https://makenowjust-labs.github.io/recheck/playground/ to confirm whether a path is vulnerable.

Release Notes

8.4.0

Important

Fixed

  • Restricts wildcard backtracking when using more than 1 in a path (#421)

Changed

  • Dedupes regex prefixes (#422)
    • This will result in shorter regular expressions for some cases using optional groups
  • Rejects large optional route combinations (#424)
    • When using groups such as /users{/delete} it will restrict the number of generated combinations to < 256, equivalent to 8 top-level optional groups and unlikely to occur in a real world application, but avoids exploding the regex size for applications that accept user created routes

8.3.0

Changed

Other

v8.2.0...v8.3.0

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 28 commits:


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu cancel merge
Cancels automatic merging of this PR
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu depfu bot added the depfu label Mar 28, 2026
@depfu
Copy link
Copy Markdown
Contributor Author

depfu bot commented Apr 1, 2026

Closed in favor of #601.

@depfu depfu bot closed this Apr 1, 2026
@depfu depfu bot deleted the depfu/update/pnpm/path-to-regexp-8.4.0 branch April 1, 2026 00:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants