Security Flaw in fast-jwt Library by Nearform
CVE-2026-35042
7.5HIGH
What is CVE-2026-35042?
The fast-jwt library, which provides a fast implementation for JSON Web Tokens (JWT), contains a vulnerability in versions 6.1.0 and earlier. This flaw arises from the library's failure to correctly validate the 'crit' (Critical) header parameter as stipulated in RFC 7515 §4.1.11. When a JSON Web Signatures (JWS) token includes a 'crit' array with extensions that the fast-jwt library does not comprehend, the library mistakenly accepts the token rather than rejecting it. This behavior contravenes the requirements detailed in the RFC, potentially exposing applications utilizing this library to security risks associated with invalid token acceptance.
Affected Version(s)
fast-jwt <= 6.1.0
