ReDoS in fast-jwt when using RegExp in allowed* leading to CPU exhaustion during token verification
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Denial of service
- Confidentiality · integrity · availability
- None · None · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · NVD. Fix status from CNA and GitHub. Impact type from CWE-1333.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| nearform | fast-jwt | 5.0.0 to before 6.2.1 | 6.2.1 | Patch available | CNA |
| — | fast-jwt (npm) | 5.0.0 to before 6.2.1 | 6.2.1 | Patch available | GHSA-cjw9-ghj4-fwxf |
- fast-jwt Vendornearform Affected 5.0.0 to before 6.2.1 Fixed in 6.2.1 Patch available CNA
- fast-jwt (npm) Vendor— Affected 5.0.0 to before 6.2.1 Fixed in 6.2.1 Patch available GHSA-cjw9-ghj4-fwxf
Remediation
- Fix · CNA fast-jwt (nearform) Fixed in 6.2.1
- Fix · GHSA-cjw9-ghj4-fwxf fast-jwt (npm) Fixed in 6.2.1 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-35041
- 2026-10-03 Alias added: GHSA-cjw9-ghj4-fwxf
References
Patch 2
More nearform Fast-jwt vulnerabilities
- TI-2026-27174 fast-jwt has an incomplete fix for CVE-2023-48223: JWT Algorithm Confusion via Whitespace-Prefixed RSA Public Key CVSS 3.1CRITICAL 9.1
- TI-2026-27245 fast-jwt accepts unknown `crit` header extensions (RFC 7515 §4.1.11 MUST violation) CVSS 3.1HIGH 7.5
- TI-2026-27243 fast-jwt: Stateful RegExp (/g or /y) causes non-deterministic allowed-claim validation (logical DoS) CVSS 3.1MEDIUM 5.3
- TI-2026-27242 Insufficient verification of data authenticity in nearform fast-jwt CVSS 3.1CRITICAL 9.1
- TI-2023-26087 fast-jwt JWT Algorithm Confusion CVSS 3.1MEDIUM 5.9
Sources
- CVE-2026-35041 · CVE Program
- CVE-2026-35041 · NVD
- FIRST EPSS
- GHSA-cjw9-ghj4-fwxf · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences