Vulnerabilities/

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

Severity:
High

Description

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.

Recommendation

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

References

Related Issues

Tags:
npm
path-to-regexp
Anything's wrong? Let us know Last updated on March 27, 2026