Intel

AIKIDO-2026-957913

fast-jwt is vulnerable to Improper Verification of Cryptographic Signature

Improper Verification of Cryptographic SignatureGHSA-g3jj-5cmm-3hxx Published 3 days ago

74

High Risk

This Affects:

JSfast-jwt
6.2.4 - 6.2.4
Fixed in 6.3.0
Are you affected? Scan for Free

TL;DR

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.

Who does this affect?

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.

Background info

fast-jwt is vulnerable to Improper Verification of Cryptographic Signature in versions 6.2.4 - 6.2.4.

How to fix this

Upgrade the fast-jwt library to the patch version.