{"id":"UBUNTU-CVE-2026-4867","details":"Impact: A bad regular expression is generated any time you have three or more parameters within a single segment, separated by something that is not a period (.). For example, /:a-:b-:c or /:a-:b-:c-:d. The backtrack protection added in path-to-regexp@0.1.12 only prevents ambiguity for two parameters. With three or more, the generated lookahead does not block single separator characters, so capture groups overlap and cause catastrophic backtracking. Patches: Upgrade to path-to-regexp@0.1.13 Custom regex patterns in route definitions (e.g., /:a-:b([^-/]+)-:c([^-/]+)) are not affected because they override the default capture group. Workarounds: All versions can be patched by providing a custom regular expression for parameters after the first in a single segment. As long as the custom regular expression does not match the text before the parameter, you will be safe. For example, change /:a-:b-:c to /:a-:b([^-/]+)-:c([^-/]+). If paths cannot be rewritten and versions cannot be upgraded, another alternative is to limit the URL length.","modified":"2026-05-21T12:15:12.228268087Z","published":"2026-03-26T17:16:00Z","withdrawn":"2026-05-21T12:08:04Z","upstream":["CVE-2026-4867"],"references":[{"type":"REPORT","url":"https://ubuntu.com/security/CVE-2026-4867"},{"type":"REPORT","url":"https://www.cve.org/CVERecord?id=CVE-2026-4867"},{"type":"REPORT","url":"https://github.com/pillarjs/path-to-regexp/security/advisories/GHSA-37ch-88jc-xwx2"},{"type":"REPORT","url":"https://blakeembrey.com/posts/2024-09-web-redos"},{"type":"REPORT","url":"https://cna.openjsf.org/security-advisories.html"},{"type":"REPORT","url":"https://github.com/advisories/GHSA-9wv6-86v2-598j"}],"affected":[{"package":{"name":"node-path-to-regexp","ecosystem":"Ubuntu:16.04:LTS","purl":"pkg:deb/ubuntu/node-path-to-regexp?arch=source&distro=xenial"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0.1-1"],"ecosystem_specific":{"binaries":[{"binary_name":"node-path-to-regexp","binary_version":"1.0.1-1"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-4867.json"}},{"package":{"name":"node-path-to-regexp","ecosystem":"Ubuntu:18.04:LTS","purl":"pkg:deb/ubuntu/node-path-to-regexp?arch=source&distro=bionic"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["1.0.1-1"],"ecosystem_specific":{"binaries":[{"binary_version":"1.0.1-1","binary_name":"node-path-to-regexp"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-4867.json"}},{"package":{"name":"node-path-to-regexp","ecosystem":"Ubuntu:20.04:LTS","purl":"pkg:deb/ubuntu/node-path-to-regexp?arch=source&distro=focal"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"}]}],"versions":["3.0.0-2","3.1.0-1","6.1.0-2"],"ecosystem_specific":{"binaries":[{"binary_version":"6.1.0-2","binary_name":"node-path-to-regexp"}]},"database_specific":{"source":"https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2026/UBUNTU-CVE-2026-4867.json"}}],"schema_version":"1.7.5","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H"},{"type":"Ubuntu","score":"medium"}]}