Vulnerability library
Security checkMarch 27, 2026

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

Understand the exposure, see the recommended fix, and check whether your own website has related weaknesses.

Medium severitynpmpath-to-regexp

Check your website

Find this and other vulnerabilities with a free scan.

Your scan runs on your computer. No account required.

Description

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:

Safe examples:

Recommendation

Update the path-to-regexp package to the latest compatible version. Followings are version details:

  • Affected version(s): >= 8.0.0, < 8.4.0
  • Patched version(s): 8.4.0

References

Could your website be exposed too?

SmartScanner can check your website for path-to-regexp vulnerable to Regular Expression Denial of Service via multiple wildcards and gives you actionable findings to investigate.

Start a free scan

Related Issues

See something that needs correcting? Let us knowUpdated March 27, 2026