Advisory

GHSA-j3q9-mxjg-w52f

Also known as: CVE-2026-4926

Summary

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

Details

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.

Severity

High Basis: The source's own band: HIGH

Dates

Published
2026-03-27 22:23 UTC
Modified
2026-09-10 03:50 UTC

Affected packages and fixes

path-to-regexp

npm · All systems

Affected

  • introduced 8.0.0, fixed 8.4.0 (semver)

Fixed versions

8.4.0

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences