Security Vulnerability Report
中文
CVE-2026-4926 CVSS 7.5 HIGH

CVE-2026-4926

Published: 2026-03-26 19:17:08
Last Modified: 2026-04-16 18:04:13
Source: ce714d77-add3-4f53-aff5-83d477b104bb

Description

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.

CVSS Details

CVSS Score
7.5
Severity
HIGH
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

Configurations (Affected Products)

cpe:2.3:a:pillarjs:path-to-regexp:*:*:*:*:*:node.js:*:* - VULNERABLE
< 8.4.0

PoC / Exploit Code

⚠ For Security Research Only
The following code is for security research and authorized testing only.
python
// PoC for CVE-2026-4926 // Triggering the ReDoS vulnerability via sequential optional route groups // // The vulnerability is triggered when a router processes a route pattern // with multiple sequential optional groups, e.g., {a}{b}{c}... // This causes the underlying regex to grow exponentially. // Example of a vulnerable route definition const vulnerableRoute = "/api/{a}{b}{c}{d}{e}{f}{g}{h}{i}{j}/endpoint"; // In a real scenario, sending a request matching this pattern to the server // would cause the high CPU consumption. console.log("PoC: Request pattern constructed to exploit ReDoS."); console.log("Pattern:", vulnerableRoute); // Note: This requires the vulnerable library to be running on the server.

References

Raw JSON Data

JSON
{"cve": {"id": "CVE-2026-4926", "sourceIdentifier": "ce714d77-add3-4f53-aff5-83d477b104bb", "published": "2026-03-26T19:17:08.387", "lastModified": "2026-04-16T18:04:13.123", "vulnStatus": "Analyzed", "cveTags": [], "descriptions": [{"lang": "en", "value": "Impact:\n\nA 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.\n\nPatches:\n\nFixed in version 8.4.0.\n\nWorkarounds:\n\nLimit the number of sequential optional groups in route patterns. Avoid passing user-controlled input as route patterns."}, {"lang": "es", "value": "Impacto:\n\nSe genera una expresión regular defectuosa siempre que se tienen múltiples grupos opcionales secuenciales (sintaxis de llaves), como `{a}{b}{c}:z`. La expresión regular generada crece exponencialmente con el número de grupos, causando denegación de servicio.\n\nParches:\n\nCorregido en la versión 8.4.0.\n\nSoluciones alternativas:\n\nLimitar el número de grupos opcionales secuenciales en los patrones de ruta. Evitar pasar entradas controladas por el usuario como patrones de ruta."}], "metrics": {"cvssMetricV31": [{"source": "ce714d77-add3-4f53-aff5-83d477b104bb", "type": "Secondary", "cvssData": {"version": "3.1", "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H", "baseScore": 7.5, "baseSeverity": "HIGH", "attackVector": "NETWORK", "attackComplexity": "LOW", "privilegesRequired": "NONE", "userInteraction": "NONE", "scope": "UNCHANGED", "confidentialityImpact": "NONE", "integrityImpact": "NONE", "availabilityImpact": "HIGH"}, "exploitabilityScore": 3.9, "impactScore": 3.6}]}, "weaknesses": [{"source": "ce714d77-add3-4f53-aff5-83d477b104bb", "type": "Secondary", "description": [{"lang": "en", "value": "CWE-400"}, {"lang": "en", "value": "CWE-1333"}]}], "configurations": [{"nodes": [{"operator": "OR", "negate": false, "cpeMatch": [{"vulnerable": true, "criteria": "cpe:2.3:a:pillarjs:path-to-regexp:*:*:*:*:*:node.js:*:*", "versionStartIncluding": "8.0.0", "versionEndExcluding": "8.4.0", "matchCriteriaId": "DB421812-F7E3-4CC5-B02B-53CCBFDFB671"}]}]}], "references": [{"url": "https://cna.openjsf.org/security-advisories.html", "source": "ce714d77-add3-4f53-aff5-83d477b104bb", "tags": ["Third Party Advisory"]}]}}