CVE-2026-48526

PyJWT: Public-key JWK accepted as HMAC secret enables forged HS256 tokens when mixed families are allowed

State
Published
Severity
7.4 High
Published
May 28, 2026
Updated
Sep 10, 2026
Reserved
May 21, 2026

Read the record on cve.org

Description

PyJWT is a JSON Web Token implementation in Python. Prior to 2.13.0, when the verifier is decoding JSON Web Tokens, while supporting both asymmetric and HMAC algorithms, the library does not validate use of JSON Web Keys in HMAC algorithm, allowing attacker to use the issuer public key as the secret key for HMAC algorithm. This vulnerability is fixed in 2.13.0.

Scores

CVSSScoreVectorSource
3.17.4 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:NGitHub_M
3.17.4 HighCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:Nredhat-SADP

Weaknesses

  • CWE-287 Improper Authentication
  • CWE-347 Improper Verification of Cryptographic Signature

Affected Products

ProductVersions
pyjwtjpadilla
  • < 2.13.0Affected

References

Every record here comes from the CVE Program’s CVE List. © 1999–2026 The MITRE Corporation. CVE is a registered trademark of The MITRE Corporation. The records are reproduced under the CVE Program terms of use.