The regular expression that is vulnerable to backtracking can be generated in versions before 0.1.12 of path-to-regexp, originally reported in CVE-2024-45296
Upgrade to 0.1.12.
Avoid using two parameters within a single path segment, when the separator is not . (e.g. no /:a-:b). Alternatively, you can define the regex used for both parameters and ensure they do not overlap to allow backtracking.
{
"nvd_published_at": "2024-12-05T23:15:06Z",
"severity": "HIGH",
"github_reviewed": true,
"cwe_ids": [
"CWE-1333"
],
"github_reviewed_at": "2024-12-05T22:40:47Z"
}