ReDoS in fast-jwt when using RegExp in allowed* leading to CPU exhaustion during token verification (nearform fast-jwt)
At a glance
- Source
- NVD
- EPSS
- EPSS 0.26 % Β· percentile 18 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- GitHub_M
- NVD status
- Analyzed
Description
fast-jwt provides fast JSON Web Token (JWT) implementation. From 5.0.0 to 6.2.0, a denial-of-service condition exists in fast-jwt when the allowedAud verification option is configured using a regular expression. Because the aud claim is attacker-controlled and the library evaluates it against the supplied RegExp, a crafted JWT can trigger catastrophic backtracking in the JavaScript regex engine, resulting in significant CPU consumption during verification. This vulnerability is fixed in 6.2.1.
Weaknesses (CWE)
- CWE-1333 β Inefficient Regular Expression Complexity
References
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.1 | MEDIUM 4.2 | CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H | GitHub_M |
| CVSS 3.1 | MEDIUM 4.2 | CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H | NVD Β· security-advisories@github.com (Secondary) |
| CVSS 3.1 | MEDIUM 6.5 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H | NVD Β· nvd@nist.gov (Primary) |
Advisories
- GHSA-cjw9-ghj4-fwxf β fast-jwt has a ReDoS when using RegExp in allowed* leading to CPU exhaustion during token verification
European references
- ENISA EUVD Β· EUVD-2026-20899
- GCVE Β· GCVE-0-2026-35041
Affected configurations (NVD CPE)
cpe:2.3:a:nearform:fast-jwt:*:*:*:*:*:node.js:*:*β₯ 5.0.0 < 6.2.1
Affected products
| Product | Versions |
|---|---|
| nearform Β· fast-jwt | affected >= 5.0.0, < 6.2.1 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST β attribution requested |
| ENISA EUVD | ENISA β reproduction authorised, source acknowledged |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain β this product uses data from the NVD API but is not endorsed or certified by the NVD |