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.18% (7th 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-20250948
  • published29 Sept 2026
  • disclosed28 Sept 2026
  • creditYuSung Han

Introduced: 28 Sep 2026

NewCVE-2026-102266  (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 _verify_signature method in jwt/api_jws.py when a PyJWK object is used to verify an HMAC-signed token. In the vulnerable code path, key.key is used directly without passing it through alg_obj.prepare_key(), which means the minimum HMAC key-length check is bypassed. An attacker can supply a weak or undersized HMAC key that would normally be rejected, potentially forging or accepting invalid signatures and compromising both confidentiality and integrity.

Note: This is only exploitable when a PyJWK object is passed directly to the verification call, as the minimum HMAC key-length check does not reject the key under the default configuration in that code path.

CVSS Base Scores

version 4.0
version 3.1