CVE-2026-114618
Empty audience list lets JWTBearerGrant accept any aud, enabling token misuse.
- CVSS 6.8
- CWE-287
- Authentication, Authorization, and Session Management
- Remote
Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to 1.9.0, the default RFC 7523 JWTBearerGrant.get_audiences() returns an empty list, causing JWTBearerGrant.verify_claims() to require only that an aud claim exists without matching the current authorization server. An attacker holding a legitimate assertion for another service can present it to a server that shares the signing key and uses the default grant, obtaining an access token across a trust boundary. Implementations that override get_audiences() with the server's valid audience identifiers are not affected. This issue is fixed in version 1.9.0.
- CWE
- CWE-287
- CVSS base score
- 6.8
- Published
- 2026-10-22
- OWASP
- A01 Broken Access Control
- Orthogonal defect classification
- Checking
- Code defect classification
- Missing Check
- Category
- Authentication, Authorization, and Session Management
- Subcategory
- Insecure Authentication Mechanisms
- Accessibility scope
- Remote
- Impact
- Unauthorized Access
- Affected component
- Python
- Fixed by upgrading
- Yes
Solution
Upgrade Authlib to version 1.9.0 or later.
Vulnerable code sample
from authlib.oauth2.rfc7523 import JWTBearerGrant
class MyJWTBearerGrant(JWTBearerGrant):
# VULNERABLE: get_audiences returns empty list, allowing any audience
def get_audiences(self):
return super().get_audiences()Patched code sample
from authlib.oauth2.rfc7523 import JWTBearerGrant
class MyJWTBearerGrant(JWTBearerGrant):
# FIX: return server's valid audience identifiers
def get_audiences(self):
return ["https://my-auth-server.example.com/token"]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 JOSE key, scope, and audience validation (authlib/authlib)
authlib/jose/rfc7518/oct_key.py,authlib/jose/rfc7518/oct_key.py · OctKey.get_op_key,authlib/jose/rfc7518/oct_key.py · OctKey.import_key,authlib/oauth2/rfc7523/jwt_bearer.py · JWTBearerGrant.get_audiences,authlib/oauth2/rfc7523/jwt_bearer.py · JWTBearerGrant.verify_claims,authlib/oidc/core/grants/hybrid.py · OpenIDHybridGrant.create_granted_params,authlib/oidc/core/grants/hybrid.py · OpenIDHybridGrant.save_authorization_code,authlib/oidc/core/grants/hybrid.py · OpenIDHybridGrant.validate_authorization_request,authlib/oidc/core/grants/implicit.py · OpenIDImplicitGrant.create_granted_params,authlib/oidc/core/grants/implicit.py · OpenIDImplicitGrant.validate_authorization_request
Cite this entry
@misc{vaitp:cve2026114618,
title = {{Empty audience list lets JWTBearerGrant accept any aud, enabling token misuse.}},
author = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
year = {2026},
note = {VAITP Python Vulnerability Dataset, entry CVE-2026-114618},
howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-114618/}}
}
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 ::
