# CVE-2026-85394: python-jose algorithm confusion in HMAC key validation

Source: https://junglewise.ai/threats/cve-2026-85394-python-jose-algorithm-confusion-in-hmac-key-validation  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-03. Updated: 2026-09-25  
License: CC BY 4.0 with a link back

CVE-2026-85394 · Severity: critical · CVSS 9.1 · Published 2026-09-03

python-jose, a library used by applications to validate JSON Web Tokens (JWTs), fails to properly validate asymmetric cryptographic keys when initializing HMAC-based signatures. An attacker with access to a service's public key can forge valid JWTs that the library will accept, potentially allowing unauthorized access or privilege escalation. This is a regression—an incomplete fix for a prior token forgery vulnerability.

Technologies: [python-jose (PyPI)](https://junglewise.ai/threats/technologies/pypi-python-jose). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-85394 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-85394 being exploited in the wild.

**How severe is CVE-2026-85394?** Critical severity, with a CVSS score of 9.1, published 3 September 2026.

**Which products and versions are affected?** python-jose (PyPI) <= 3.5.0.

**Is there a fix for CVE-2026-85394?** No fixed version is recorded yet. Check the vendor's advisory in the references below. If you run it, Junglewise drafts a mitigation that fits your setup and applies it once you approve, with senior security engineers behind it.

**How is CVE-2026-85394 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-85394?** Check whether you run python-jose (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## Technical details

python-jose fails to properly validate key formats during HMAC (HS256) initialization, accepting DER-encoded public keys that lack PEM armor or SSH prefixes. An attacker with knowledge of a service's public key (often publicly available) can construct and sign tokens using the HMAC algorithm, bypassing asymmetric signature verification when explicit algorithm restrictions are not enforced. The vulnerability is an incomplete fix for CVE-2024-33663, which addressed similar algorithm confusion with OpenSSH ECDSA keys. No authentication or user interaction is required; exploitation requires only network access to a service using the vulnerable library. Patched versions enforce stricter key format validation to prevent key confusion between asymmetric and symmetric algorithms.

## Affected products

- python-jose python-jose through 3.5.0

## Identifiers

- CVE-2026-85394
- GHSA-3qf3-8w2g-rqmx

## Timeline

- 2026-09-03: disclosed
- other: Related to incomplete fix for CVE-2024-33663 (prior algorithm confusion vulnerability)

## References

- [https://github.com/mpdavis/python-jose](https://github.com/mpdavis/python-jose)

## Related threats

- [PYSEC-2026-4298 - python-jose algorithm confusion guard bypassed by DER-encoded public keys](https://junglewise.ai/threats/cve-2024-33663-python-jose-algorithm-confusion-with-openssh-ecdsa-keys)
- [python-jose denial of service via compressed JWE content](https://junglewise.ai/threats/cve-2024-29370-python-jose-denial-of-service-via-compressed-jwe-content)
- [python-jose denial of service via compressed JWE content](https://junglewise.ai/threats/cve-2024-33664-python-jose-denial-of-service-via-compressed-jwe-content)
- [python-jose timing attack in HMAC key comparison](https://junglewise.ai/threats/cve-2016-7036-python-jose-timing-attack-in-hmac-key-comparison)
