Improper Verification of Cryptographic Signature in pyjwt - #VU150524
Published: September 17, 2026
Vulnerability details
The vulnerability allows a remote attacker to forge authentication tokens with arbitrary claims.
The vulnerability exists due to improper verification of cryptographic signatures in HMACAlgorithm.prepare_key when verifying tokens with DER-form asymmetric public keys while HMAC and asymmetric algorithms are enabled. A remote attacker can submit a forged HMAC-signed token to forge authentication tokens with arbitrary claims.
The issue does not affect PyJWK or PyJWKClient verification paths.