CVE-2026-35041

ReDoS in fast-jwt when using RegExp in allowed* leading to CPU exhaustion during token verification

State
Published
Severity
4.2 Medium
Published
Apr 9, 2026
Updated
Apr 9, 2026
Reserved
Mar 31, 2026

Read the record on cve.org

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.

Scores

CVSSScoreVectorSource
3.14.2 MediumCVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:HGitHub_M

Weaknesses

  • CWE-1333 Inefficient Regular Expression Complexity

Affected Products

ProductVersions
fast-jwtnearform
  • >= 5.0.0, < 6.2.1Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.