CVE-2026-118669

OAuthLib: Token grants can use attacker-supplied client_id for authorization after authenticating a different client

Published Oct 28, 2026 CVSS 4.0 · 8.4 High EPSS < 1% KEV · Not listed
Description
OAuthLib is an implementation of the OAuth request-signing logic for Python 3.6+. Prior to 4.0.0, the client_credentials and Resource Owner Password Credentials token grant handlers can authenticate request.client as one confidential client while retaining an attacker-supplied request.client_id for validate_grant_type and validate_scopes. A lower-privilege authenticated client can therefore cause grant and scope authorization to use another client's identity when an application validator relies on the documented client_id argument, potentially issuing tokens with unauthorized grants or scopes. Validators that authorize exclusively from request.client may not be affected. This issue is fixed in version 4.0.0.

Analysis

AI-generated

Technical impact

The vulnerability arises when OAuthLib’s client_credentials and Resource Owner Password Credentials grant handlers authenticate the request.client as a confidential client but retain an attacker‑supplied request.client_id for validation functions. This causes grant type and scope checks to be performed against the attacker‑supplied client_id rather than the authenticated client. The result is that an attacker can obtain tokens with grants or scopes belonging to a different, higher‑privilege client, effectively bypassing authorization. This flaw represents an improper authorization misuse (CWE‑807) and a privilege‑escalation logic flaw (CWE‑863).

Affected Systems

The affected product is the OAuthLib Python library (oauthlib:oauthlib). All releases before version 4.0.0 are vulnerable, including every deployment that installs versions 3.x and earlier in a Python 3.6+ environment. The flaw exists specifically in the client_credentials and Resource Owner Password Credentials grant handlers.

Risk and Exploitability

The CVSS score of 8.4 indicates a high severity. EPSS score of < 1% indicates a very low probability of exploitation, and the issue is not listed in the CISA KEV catalog, so the likelihood of observed exploitation is low. Attackers would need to control or influence the token request flow, supplying a client_id that differs from the authenticated client while using client_credentials or Resource Owner Password Grants. Once that occurs, the library will issue a token with the attacker‑supplied client’s identity and scopes, potentially granting access to protected resources. The flaw is exploitable in environments where application validators rely on the request.client_id field and have not otherwise reconciled it with the authenticated client.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade OAuthLib to version 4.0.0 or later, which aligns grant and scope validation with the authenticated client.
  • Verify that any custom validator logic properly compares request.client_id with the authenticated client and rejects mismatches.
  • If the Resource Owner Password Credentials grant is not required, disable it or restrict it to trusted clients to limit the attack surface.

Generated by OpenCVE AI on October 30, 2026 at 14:06 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-7984-qgvg-3j9c OAuthLib: Token grants can use attacker-supplied client_id for authorization after authenticating a different client
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Oauthlib
Oauthlib oauthlib
Vendors & Products Oauthlib
Oauthlib oauthlib
Type Values Removed Values Added
Weaknesses CWE-807
References
Metrics threat_severity

None

cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:N'}

threat_severity

Important

Type Values Removed Values Added
Description OAuthLib is an implementation of the OAuth request-signing logic for Python 3.6+. Prior to 4.0.0, the client_credentials and Resource Owner Password Credentials token grant handlers can authenticate request.client as one confidential client while retaining an attacker-supplied request.client_id for validate_grant_type and validate_scopes. A lower-privilege authenticated client can therefore cause grant and scope authorization to use another client's identity when an application validator relies on the documented client_id argument, potentially issuing tokens with unauthorized grants or scopes. Validators that authorize exclusively from request.client may not be affected. This issue is fixed in version 4.0.0.
Title OAuthLib: Token grants can use attacker-supplied client_id for authorization after authenticating a different client
Weaknesses CWE-863
References
Metrics cvssV4_0

{'score': 8.4, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:L/UI:N/VC:N/VI:H/VA:N/SC:H/SI:H/SA:N'}

Weaknesses
  • CWE-807

    Reliance on Untrusted Inputs in a Security Decision

  • CWE-863

    Incorrect Authorization

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Nov 3, 2026, 1:38 PM
Reserved
Oct 28, 2026, 5:25 PM
Status
Awaiting Analysis
Published
Oct 28, 2026, 10:17 PM
Modified
Nov 3, 2026, 2:17 PM
Severity
Important
Public date
Oct 28, 2026, 9:09 PM