Improper Verification of Cryptographic Signature Affecting python-jose package, versions [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.22% (13th 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-PYTHONJOSE-19639037
  • published14 Sept 2026
  • disclosed3 Sept 2026
  • creditUnknown

Introduced: 3 Sep 2026

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

How to fix?

There is no fixed version for python-jose.

Overview

Affected versions of this package are vulnerable to Improper Verification of Cryptographic Signature in the HMAC secret guard of jose/backends/native.py, which rejects a key only when is_pem_format(key) or is_ssh_key(key) holds and so never catches DER-encoded (binary SubjectPublicKeyInfo) public keys. An attacker can forge HS256 tokens that verify as valid by encoding the service's RSA or EC public key in DER form and using it as the HMAC secret. This requires the server to pass its public key to decode as raw DER bytes, which is the narrowing factor, since PEM is now blocked and a typed RSAKey/JWK object never reaches this constructor, leaving only the subset of servers that feed raw DER (for example a .der/.cer file or public_bytes(Encoding.DER, ...)). It also requires the server not to pin to asymmetric algorithms, since algorithms=None or omitted performs no allowlist check (jws.py:258 filters only when algorithms is not None) while algorithms=["RS256"] rejects the forgery before the key matters, and a list containing both RS256 and HS256 stays exploitable.

Workaround

This vulnerability can be avoided by passing an explicit algorithms allowlist to the verification call that excludes HMAC algorithms, for example algorithms=["RS256"], so a public key cannot be used as an HMAC secret.

Note: This is a bypass of the fix for the vulnerability described in CVE-2024-33663.

CVSS Base Scores

version 4.0
version 3.1