---
id: "CVE-2026-118669"
kind: "vulnerability"
aliases: ["CVE-2026-118669"]
title: "OAuthLib: client identity mismatch lets clients obtain unauthorized tokens"
severity: "high"
cvss: 8.4
epss: null
exploited: false
status: "open"
category: "package"
products: []
ecosystems: []
tags: ["oauth-provider", "oauthlib", "package", "python"]
not_affected_if: ["auth-required-only-for-trusted-clients", "no-client-credentials-grant", "no-password-grant", "request-client-validators"]
published_at: "2026-10-28T22:17:12+00:00"
first_seen_at: "2026-10-28T22:35:34+00:00"
updated_at: "2026-10-28T22:36:41+00:00"
sources: [{"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-118669", "first_seen_at": "2026-10-28T22:35:34+00:00"}]
---

# OAuthLib: client identity mismatch lets clients obtain unauthorized tokens

OAuthLib's client_credentials and password grant handlers can authenticate one client while checking grant type and scopes against an attacker-supplied client_id. A lower-privilege authenticated client can therefore obtain tokens with grants or scopes it should not have.

_Summary, check and fix written by a model from the sources; labelled as such._

## How to check

- Check the installed OAuthLib version with `pip show oauthlib` or `pip freeze | grep -i oauthlib`
- Look for a `validate_grant_type` or `validate_scopes` implementation that reads `request.client_id` instead of `request.client`

## Fix

- Upgrade OAuthLib to `4.0.0` or later
- Until upgraded, make validators authorize from `request.client` rather than `request.client_id`

## Timeline

- 2026-10-28T22:35:34+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-118669

## From the sources

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.

---

_Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai_
