ReDoS in fast-jwt when using RegExp in allowed* leading to CPU exhaustion during token verification
Summary
| CVE | CVE-2026-35041 |
|---|---|
| State | PUBLISHED |
| Assigner | GitHub_M |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-04-09 16:16:27 UTC |
| Updated | 2026-04-09 17:16:25 UTC |
| 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. |
Risk And Classification
Primary CVSS: v3.1 4.2 MEDIUM from [email protected]
CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
Problem Types: CWE-1333 | CWE-1333 CWE-1333: Inefficient Regular Expression Complexity
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Secondary | 4.2 | MEDIUM | CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H |
| 3.1 | CNA | DECLARED | 4.2 | MEDIUM | CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
HighPrivileges Required
HighUser Interaction
RequiredScope
UnchangedConfidentiality
NoneIntegrity
NoneAvailability
HighCVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
Vendor Declared Affected Products
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/nearform/fast-jwt/pull/595 | [email protected] | github.com | |
| github.com/nearform/fast-jwt/security/advisories/GHSA-cjw9-ghj4-fwxf | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | github.com | |
| github.com/nearform/fast-jwt/releases/tag/v6.2.1 | [email protected] | github.com | |
| github.com/nearform/fast-jwt/commit/b0be0ca161593836a153d5180ca5358ad9b5... | [email protected] | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.