VAITP Dataset

← Back to the dataset

CVE-2026-114619

Improper scope validation allows unauthorized OpenID token issuance.

  • CVSS 4.6
  • CWE-863
  • Authentication, Authorization, and Session Management
  • Remote

Authlib is a Python library which builds OAuth and OpenID Connect servers. Prior to 1.9.0, OpenIDImplicitGrant.validate_authorization_request() checks the client-controlled raw request.payload.scope for openid after the parent grant has filtered allowed scopes into request.scope. A registered client permitted an ID token response type but not the openid scope can add openid to the request, obtain user consent, and receive a signed ID token containing the user's subject and allowed profile claims. Authorization code flow and deployments that allow openid for every client permitted an ID token response are not affected. In authlib/oidc/core/grants/implicit.py, OpenIDImplicitGrant.validate_authorization_request() checks request.payload.scope instead of the filtered request.scope. This issue is fixed in version 1.9.0.

CVSS base score
4.6
Published
2026-10-22
OWASP
A01 Broken Access Control
Orthogonal defect classification
Checking
Code defect classification
Incorrect Check
Category
Authentication, Authorization, and Session Management
Subcategory
Privilege Escalation
Accessibility scope
Remote
Impact
Information Disclosure
Affected component
authlib
Fixed by upgrading
Yes

Solution

Upgrade Authlib to version 1.9.0 or later.

Vulnerable code sample

from authlib.oidc.core.grants.implicit import OpenIDImplicitGrant

class Request:
    def __init__(self, payload, scope):
        self.payload = payload      # raw request parameters
        self.scope = scope          # filtered scopes after client policy

class Payload(dict):
    pass

class MyImplicitGrant(OpenIDImplicitGrant):
    def validate_authorization_request(self, request):
        # VULNERABLE: checks raw payload.scope instead of filtered request.scope
        raw_scopes = request.payload.get('scope', '')
        if 'openid' not in raw_scopes.split():
            raise ValueError('openid scope required')
        # further validation using already filtered scopes
        allowed = request.scope
        if not set(allowed).issubset({'profile', 'email'}):
            raise ValueError('invalid scopes')

Patched code sample

from authlib.oidc.core.grants.implicit import OpenIDImplicitGrant

class Request:
    def __init__(self, payload, scope):
        self.payload = payload      # raw request parameters
        self.scope = scope          # filtered scopes after client policy

class Payload(dict):
    pass

class MyImplicitGrant(OpenIDImplicitGrant):
    def validate_authorization_request(self, request):
        # FIX: checks filtered request.scope instead of raw request.payload.scope
        filtered_scopes = request.scope
        if 'openid' not in filtered_scopes:
            raise ValueError('openid scope required')
        # further validation using already filtered scopes
        allowed = request.scope
        if not set(allowed).issubset({'profile', 'email'}):
            raise ValueError('invalid scopes')

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:cve2026114619,
  title        = {{Improper scope validation allows unauthorized OpenID token issuance.}},
  author       = {Bogaerts, Fr\'ed\'eric and Ivaki, Naghmeh and Fonseca, Jos\'e},
  year         = {2026},
  note         = {VAITP Python Vulnerability Dataset, entry CVE-2026-114619},
  howpublished = {\url{https://netpack.pt/vaitp/vulnerability/CVE-2026-114619/}}
}

Download this entry as JSON Download the whole dataset

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 ::

Before you use the VAITP AI models

Please read and accept the following disclaimer:

By choosing "I understand and accept", you acknowledge that you understand and agree to these terms.