PyPI
CVE-2026-118669
OAuthLib: Token grants can use attacker-supplied client_id for authorization after authenticating a different client
- Severity
- High
- Published
- 30 Oct 2026
- Last changed
- 30 Oct 2026
- Added to UpHeron
- 23 Nov 2026
- Fixed in
- 4.0.0
- Exploit chance
- 0.4% in the next 30 daysHigher than 31% of CVEs. EPSS by FIRST, 24 Nov 2026
- Also known as
- GHSA-7984-qgvg-3j9c
- Sources
- OSV.dev and GitHub
Description
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 body already contains client_id=..., OAuthlib keeps that value and passes it to validate_grant_type() and validate_scopes().
As a result, an authenticated low-privilege confidential client can authenticate as itself, submit another client's client_id in the token request body, and cause grant and scope validation to run under that other client identity.
Request parses query and body parameters into request attributes, including client_id:
The RequestValidator.authenticate_client() contract requires the integrator to authenticate the client and set request.client:
Affected software
| Software | Affected versions |
|---|---|
oauthlibPyPI · osv:PyPI:oauthlib |
|
About oauthlib
- Weekly downloads (PyPI)
- 62,846,170PyPI Stats, 23 Nov 2026
Vulnerabilities in oauthlib
- In our list
- 2
- Published in the last 12 months
- 2
- Critical, last 12 months
- 0
- High, last 12 months
- 2
- Known exploited
- 0
- CVE-2026-49272OAuthLib: Bearer token can be retrieved as long as client knows a valid client ID for device workflowHigh 8.5 27 Oct 2026
References
- CVE.org https://www.cve.org/CVERecord?id=CVE-2026-118669
- GitHub Advisory Database https://github.com/advisories/GHSA-7984-qgvg-3j9c