Improper Verification of Cryptographic Signature in JWT lib in rust - #VU166263
Published: November 16, 2026
Vulnerability details
The vulnerability allows a remote attacker to forge JWTs and bypass authentication and authorization in services verifying tokens with an empty HMAC key.
The vulnerability exists due to failure to reject zero-length HMAC keys in jsonwebtoken's HS256/384/512 verification when constructing keys through DecodingKey::from_secret or DecodingKey::from_jwk with a symmetric JWK containing k="". A remote attacker can submit tokens signed using an empty key, selecting an empty-key JWKS entry through the token's kid where applicable, to gain unauthorized access.