Improper Verification of Cryptographic Signature in pyjwt - #VU150525
Published: September 17, 2026
Vulnerability details
The vulnerability allows a remote attacker to forge arbitrary-claim tokens.
The vulnerability exists due to improper verification of cryptographic signatures in HMACAlgorithm.prepare_key and is_pem_format when processing a loader-accepted PEM public key that is not recognized as PEM under a mixed algorithm allow-list. A remote attacker can sign an HS256 token using the public key as an HMAC secret to forge arbitrary-claim tokens.
Exploitation requires knowledge of the public verification key, cryptography to be installed, and use of the raw PEM non-PyJWK verification path.