CVE-2026-114617
Nonce bypass via false nonce_supported claim allows token replay attacks.
- CVSS 4.2
- CWE-294
- Authentication, Authorization, and Session Management
- Remote
Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to 1.9.0, OpenIDMixin.parse_id_token() reads the nonce_supported decision from the untrusted ID token being validated and sets the expected nonce to null when that claim is the JSON boolean false. In implicit and hybrid relying parties, or applications that directly accept externally supplied ID tokens, an attacker with a captured validly signed token can bypass the nonce-to-session binding and replay the victim's token into an attacker-controlled session. Plain authorization code flow is not affected, and the token must still pass signature, issuer, and audience validation. OpenIDMixin.parse_id_token() trusts nonce_supported in both authlib/integrations/base_client/sync_openid.py and authlib/integrations/base_client/async_openid.py to disable the expected nonce. This issue is fixed in version 1.9.0.
- CWE
- CWE-294
- CVSS base score
- 4.2
- Published
- 2026-10-22
- OWASP
- A07 Identification and Authentication Failures
- Orthogonal defect classification
- Checking
- Code defect classification
- Missing Check
- Category
- Authentication, Authorization, and Session Management
- Subcategory
- Session Management Issues
- Accessibility scope
- Remote
- Impact
- Unauthorized Access
- Affected component
- Python
- Fixed by upgrading
- Yes
Solution
Upgrade Authlib to version 1.9.0 or newer.
Vulnerable code sample
import json
from authlib.oidc.core import UserInfo
class OpenIDMixin:
def parse_id_token(self, token_str, nonce=None):
# Decode the ID token (signature validation omitted for brevity)
id_token = json.loads(token_str)
# VULNERABLE: trusts 'nonce_supported' claim to disable nonce verification
if id_token.get('nonce_supported') is False:
expected_nonce = None
else:
expected_nonce = nonce
token_nonce = id_token.get('nonce')
if expected_nonce is not None and token_nonce != expected_nonce:
raise ValueError('Invalid nonce')
return UserInfo(**id_token.get('claims', {}))Patched code sample
import json
from authlib.oidc.core import UserInfo
class OpenIDMixin:
def parse_id_token(self, token_str, nonce=None):
# Decode the ID token (signature validation omitted for brevity)
id_token = json.loads(token_str)
# FIX: ignore untrusted 'nonce_supported' claim; always enforce provided nonce
expected_nonce = nonce
token_nonce = id_token.get('nonce')
if expected_nonce is not None and token_nonce != expected_nonce:
raise ValueError('Invalid nonce')
return UserInfo(**id_token.get('claims', {}))Published fix
Public sources link this CVE to the changes below. The code samples above were generated to illustrate the defect; these links lead to the code the project actually changed.
- fix(oauth): enforce nonce and JAR request validation (authlib/authlib)
authlib/integrations/base_client/async_openid.py · AsyncOpenIDMixin.parse_id_token,authlib/integrations/base_client/sync_openid.py · OpenIDMixin.parse_id_token,authlib/oauth2/rfc9101/authorization_server.py,authlib/oauth2/rfc9101/authorization_server.py · JWTAuthenticationRequest.get_request_object,authlib/oauth2/rfc9101/authorization_server.py · JWTAuthenticationRequest.get_request_object_signing_algorithms,authlib/oauth2/rfc9101/authorization_server.py · JWTAuthenticationRequest.get_server_metadata,authlib/oauth2/rfc9101/authorization_server.py · JWTAuthenticationRequest.parse_authorization_request,authlib/oauth2/rfc9101/authorization_server.py · JWTAuthenticationRequest._decode_request_object,authlib/oauth2/rfc9101/authorization_server.py · JWTAuthenticationRequest._get_raw_request_object
Cite this entry
@misc{vaitp:cve2026114617,
title = {{Nonce bypass via false nonce_supported claim allows token replay attacks.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-114617},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-114617/}}
}
Introducing the "VAITP dataset": a specialized repository of Python vulnerabilities and patches, meticulously compiled for the use of the security research community. As Python's prominence grows, understanding and addressing potential security vulnerabilities become crucial. Crafted by and for the cybersecurity community, this dataset offers a valuable resource for researchers, analysts, and developers to analyze and mitigate the security risks associated with Python. Through the comprehensive exploration of vulnerabilities and corresponding patches, the VAITP dataset fosters a safer and more resilient Python ecosystem, encouraging collaborative advancements in programming security.
The supreme art of war is to subdue the enemy without fighting.
Sun Tzu – “The Art of War”
:: Shaping the future through research and ingenuity ::
