Python-jose HS256 Token Forgery via Incomplete HMAC Key Validation (CVE-2026-85394).

Release Date: 3rd September 2026 (Added 8th September 2026)

Impact : CRITICAL

TLP Rating: Clear

The Department of Communications and Digital Transformation (DCDT) through CERT Vanuatu (CERTVU), provides the following advisory.

This alert is relevant to Organizations, System/Network administrators, and software development teams that build or operate Python applications using python-jose for JWT-based authentication or authorization, including via frameworks such as FastAPI, where python-jose is commonly used for OAuth2/JWT handling. This alert is intended to be understood by technical users and systems administrators.

What is it?

CVE-2026-85394 is a critical signature-verification bypass in python-jose, a widely-used Python library (approximately 1,800 GitHub stars and roughly 40 million PyPI downloads per month) for JSON Object Signing and Encryption (JOSE), commonly used to implement JWT-based authentication, including in FastAPI’s own official OAuth2/JWT tutorial. The library’s guard against “algorithm confusion” attacks - where an attacker tricks a service into verifying an HS256 (HMAC) token using an asymmetric public key as the shared secret - was already patched once, as CVE-2024-33663, by rejecting keys in PEM or OpenSSH format. token, bypassing the intended signature check on any application that does not explicitly restrict the algorithms it accepts.

Reference

  1. https://www.cve.org/CVERecord?id=CVE-2026-85394
  2. https://github.com/mpdavis/python-jose/issues/414