fast-jwt is vulnerable to Improper Verification of Cryptographic Signature
74
High Risk
When an application supplies serialized public JWK or JWKS JSON as the verifier key, fast-jwt does not recognize the asymmetric key material because it is not PEM-encoded and classifies it as a raw HMAC secret. If HS256 is permitted or inferred, the verifier accepts a token signed with that same public JSON text used as an HMAC key. Because JWK public material is public by design, anyone who knows the exact serialized key bytes can forge an HS256 token with arbitrary claims and have it accepted, bypassing authentication and authorization. The fix detects asymmetric JWK/JWKS structures and rejects them as HMAC secrets instead of silently reclassifying them.
You are affected if you are using a version that falls within the vulnerable range and your application passes raw serialized public JWK or JWKS JSON as the verifier key with HS256 permitted or inferred.
fast-jwt is vulnerable to Improper Verification of Cryptographic Signature in versions 6.2.4 - 6.2.4.
Upgrade the fast-jwt library to the patch version.
Connect your repositories to instantly see whether vulnerable or malicious packages exist in your codebase.
Free. No credit card required.

I consent to receiving marketing communications based on Aikido’s Privacy Policy.
SOC 2Compliant
ISO 27001Compliant