CVE Catalog

CVE-2026-102273

HighCVSS 7.4
Published: Translated: NVD NIST

Summary

PyJWT is a Python implementation of JSON Web Token standards. From 2.13.0 until 2.14.0, HMACAlgorithm.prepare_key is affected because the HMAC key guard only recognizes top-level public JWK forms and misses container representations. When an application allows HMAC and asymmetric algorithms and passes a public JWK container as the raw key, public asymmetric key material is accepted as the HMAC secret. Consequently, an attacker who knows the public key can forge a token with arbitrary authenticated claims.

Risk Assessment

An attacker can impersonate any user by forging JWT tokens if they know the public key. This leads to authentication bypass and unauthorized access.

Recommendation

Update PyJWT to version 2.14.0. Do not use public JWK keys as HMAC secrets in mixed-algorithm configurations.

Other vulnerabilities in PyJWT

See all
Original NVD description (English source)

PyJWT is a Python implementation of JSON Web Token standards. From 2.13.0 until 2.14.0, PyJWT HMACAlgorithm.prepare_key is affected because HMAC key guard only recognizes top-level public JWK forms and misses container representations. This occurs when an application allows HMAC and asymmetric algorithms and passes a public JWK container as the raw key. As a result, public asymmetric key material is accepted as the HMAC secret. Consequently, an attacker who knows the public key can forge a token with arbitrary authenticated claims. This issue is fixed in version 2.14.0.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS