Vulnerability Description
fast-jwt provides fast JSON Web Token (JWT) implementation. Prior to 6.2.1, using certain modifiers on RegExp objects in the allowedAud, allowedIss, allowedSub, allowedJti, or allowedNonce options in verify functions can cause certain unintended behaviours. This is because some modifiers are stateful and will cause failures in every second verification attempt regardless of the validity of the token provided. Such modifiers are /g (global matching) and /y (sticky matching). This does NOT allow invalid tokens to be accepted, only for valid tokens to be improperly rejected in some configurations. Instead it causes 50% of valid authentication requests to fail in an alternating pattern. This vulnerability is fixed in 6.2.1.
CVSS Score
MEDIUM
Affected Products
| Vendor | Product | Versions |
|---|---|---|
| Nearform | Fast-Jwt | < 6.2.1 |
Related Weaknesses (CWE)
References
- https://github.com/nearform/fast-jwt/commit/18d25904e4617e8753526d1b3ab5a2cccdeaPatch
- https://github.com/nearform/fast-jwt/pull/593Issue TrackingPatch
- https://github.com/nearform/fast-jwt/releases/tag/v6.2.1ProductRelease Notes
- https://github.com/nearform/fast-jwt/security/advisories/GHSA-3j8v-cgw4-2g6qExploitMitigationVendor Advisory
FAQ
What is CVE-2026-35040?
CVE-2026-35040 is a vulnerability with a CVSS score of 5.3 (MEDIUM). fast-jwt provides fast JSON Web Token (JWT) implementation. Prior to 6.2.1, using certain modifiers on RegExp objects in the allowedAud, allowedIss, allowedSub, allowedJti, or allowedNonce options in ...
How severe is CVE-2026-35040?
CVE-2026-35040 has been rated MEDIUM with a CVSS base score of 5.3/10. Review the CVSS metrics above for detailed severity breakdown.
Is there a patch for CVE-2026-35040?
Check the references section above for vendor advisories and patch information. Affected products include: Nearform Fast-Jwt.