Improper Verification of Cryptographic Signature Affecting pyjwt package, versions [2.13.0,2.14.0)


Severity

Recommended
0.0
critical
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

Exploit Maturity
Proof of Concept
EPSS
0.19% (8th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications
  • Snyk IDSNYK-PYTHON-PYJWT-20245619
  • published29 Sept 2026
  • disclosed28 Sept 2026
  • creditshaffer

Introduced: 28 Sep 2026

NewCVE-2026-102272  (opens in a new tab)
CWE-347  (opens in a new tab)

How to fix?

Upgrade PyJWT to version 2.14.0 or higher.

Overview

PyJWT is a Python implementation of RFC 7519.

Affected versions of this package are vulnerable to Improper Verification of Cryptographic Signature via the prepare_key method in jwt/algorithms.py, where an encoded JWK (such as an RSA public key) is accepted as a valid HMAC secret without rejection. An attacker who knows the target application's RSA public key can supply it as the HMAC secret to forge JWT tokens with arbitrary claims, which a verifier configured with a mixed algorithm set (e.g., algorithms=["HS256", "RS256"]) will accept as valid.

Note: This is only exploitable when the verifier is configured to accept both an asymmetric algorithm (e.g., RS256) and a symmetric HMAC algorithm (e.g., HS256) simultaneously.

CVSS Base Scores

version 4.0
version 3.1