Vulnerabilities

Vulnerability · CVE-2026-118669

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

Published Oct 30, 2026 · catalog updated Oct 30, 2026 · OAuthLib: Token grants can

Last checked Nov 6, 2026. A connected source was read within the last 7 days.

Check if you run it

No confirmed exploitation is on record for CVE-2026-118669. EPSS is 0.31%. Act only if a listed version of OAuthLib: Token grants can is installed.

Gaps on this record

  • The stored product name is a package slug. The name on this page is taken from the title (OAuthLib: Token grants can).
  • No vendor fix or required action is stored. Compare the linked advisory before you change production.
Severity
High—
Known exploitation
Not in CISA/VulnCheck KEV
EPSS
0.31%
Remediation
Version ranges on file
Affected products
PyPI oauthlib · pip oauthlib · pypi oauthlib

## Summary OAuthlib's token grant handlers can authenticate one client while authorizing the grant type and requested scopes using a different, attacker-supplied from the request body. In affected token grant flows, sets to the authenticated client object, but OAuthlib does not require to match . If the request body already contains , OAuthlib keeps that value and passes it to and . As a result, an authenticated low-privilege confidential client can authenticate as itself, submit another client's in the token request body, and cause grant and scope validation to run under that other client identity. ## Affected Surface The affected public surface is the OAuth2 token endpoint handling for: - - / Resource Owner Password Credentials The issue is relevant to OAuthlib provider deployments where: - the attacker has credentials for one valid lower-privilege confidential client; - another client has broader grants or scopes; - the application validator uses the argument passed by OAuthlib in or , as the API is designed to support. Deployments whose validators ignore the argument and authorize only from may not be affected. ## Details parses query and body parameters into request attributes, including : - https://github.com/oauthlib/oauthlib/blob/b3f9edffed6b370e3eb92721cea0da22ec7e18b9/oauthlib/common.py#L360-L397 The contract requires the integrator to authenticate the client and set : - https://github.com/oauthlib/oauthlib/blob/b3f9edffed6b370e3eb92721cea0da22ec7e18b9/oauthlib/oauth2/rfc6749/request_validator.py#L41-L66 For the grant, OAuthlib authenticates the client, verifies that has a , then performs grant and scope validation before normalizing from : - https://github.com/oauthlib/oauthlib/blob/b3f9edffed6b370e3eb92721cea0da22ec7e18b9/oauthlib/oauth2/rfc6749/grant_types/client_credentials.py#L106-L119 The problematic order is: Because OAuthlib only fills when it is missing, an attacker-supplied body value such as survives even when . The shared grant helper then auth

Are you affected?

Enter the version you run. The result uses only the ranges stored on this record.

The check returns affected, not affected, or incomplete. It does not guess a version that is missing from the record.

  • PyPI oauthlib0 → 4.0.0
  • pip oauthlib< 4.0.0
  • pypi oauthlibversion unspecified

How to fix CVE-2026-118669

What to do

Three questions, each answered from this record only. Confirm the vendor advisory before you patch.

Should you patch?

No confirmed exploitation is on record for CVE-2026-118669. EPSS is 0.31%. Act only if a listed version of OAuthLib: Token grants can is installed.

Which versions are affected?

Compare what you have installed with 0 → 4.0.0, < 4.0.0. Compare the installed version with the linked vendor advisory before you change production.

What should an analyst verify?

CWE-863: Incorrect Authorization. EPSS 0.31%. There is no CISA KEV listing. No Exploit-DB or Metasploit reference is linked. Use the source links for the original advisory.

Code

The project this record applies to. Exploit listings stay in References.

Timeline

Detection, updates, and resolution for this record.

  1. Oct 30, 2026 · GitHub Advisory Database

    Detected

    ## Summary OAuthlib's token grant handlers can authenticate one client while authorizing the grant type and requested scopes using a different, attacker-supplied from the request body. In affected token grant flows, sets to the authenticated client object, but OAuthlib does not require to match . If the request body already contains , OAuthlib keeps that value and passes it to and . As a result, a

  2. Oct 30, 2026 · GitHub Advisory Database

    Fix available

    oauthlib fixed in 4.0.0

  3. Oct 30, 2026 · GitHub Advisory Database

    Fix available

    oauthlib fixed in 4.0.0

  4. Oct 30, 2026 · GitHub Advisory Database

    Updated

    ## Summary OAuthlib's token grant handlers can authenticate one client while authorizing the grant type and requested scopes using a different, attacker-supplied from the request body. In affected token grant flows, sets to the authenticated client object, but OAuthlib does not require to match . If the request body already contains , OAuthlib keeps that value and passes it to and . As a result, a

Sources

  • CVE.orgVulnerability recordCVE-2026-118669

    Official CVE identifier

    cve.org
  • GitHub Advisory DatabasePackage advisoryGHSA-7984-qgvg-3j9c

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

    github.com
  • GitLab Advisory DatabasePackage advisoryCVE-2026-118669

    OAuthlib's token grant handlers can authenticate one client while authorizing the grant type and requested scopes using a different, attacker-supplied client_id from the request body. In affected token grant flows, authenticate_client(request) sets request.client to the authenticated client object, but OAuthlib does not require request.client_id to match request.client.client_id. If the request bo

    advisories.gitlab.com
  • OpenSSF OSV / OSV ScannerPackage advisoryGHSA-7984-qgvg-3j9c

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

    osv.dev
  • PyPA Advisory DatabasePackage advisoryGHSA-7984-qgvg-3j9c

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

    osv.dev

References

Freshness

Last verified in this catalog Nov 6, 2026. Significant claims (KEV, EPSS, CVSS, affected ranges) come from the source rows above — open the original publisher for the authoritative advisory.

  • GitLab Advisory DatabaseNov 3, 2026
  • GitHub Advisory DatabaseNov 3, 2026
  • PyPA Advisory DatabaseNov 2, 2026
  • CVE.orgOct 31, 2026
  • OpenSSF OSV / OSV ScannerOct 31, 2026