CVE-2026-116672: Authlib RFC 7592 examples omit registration-access-token client binding
Description
Summary
RFC 7592 (OAuth 2.0 Dynamic Client Registration Management Protocol) lets a previously registered client read, update, or delete its own registration, authenticated by a registrationaccesstoken issued specifically to that client at registration time. The entire security model of this protocol depends on the server verifying that the token presented in the request actually belongs to the client identified in the request, not merely that the token is valid for some client.
Authlib's ClientConfigurationEndpoint implements the control flow correctly in structure, calling authenticatetoken, then authenticateclient, then checkpermission, and treats all three as abstract methods that "Developers MUST implement in subclass." The problem is that the documented example implementations for these methods, taken together exactly as written, never perform the one check that matters: binding the authenticated token to the specific client being accessed. A developer who implements these methods by following the provided examples ends up with a complete authorization bypass on this endpoint.
Details
authenticateclient's documented example (authlib/oauth2/rfc7592/endpoint.py):
python def authenticateclient(self, request): """Read a client from the request payload. Developers MUST implement this method in subclass::
def authenticateclient(self, request): clientid = request.payload.data.get("clientid") return Client.get(clientid=clientid)
:return: client instance """ raise NotImplementedError()
This looks the target client up purely by the clientid supplied in the request payload, with no reference to the token at all.
checkpermission's documented example, in the same file:
python def checkpermission(self, client, request): """Checks whether the current client is allowed to be accessed, edited or deleted. Developers MUST implement it in subclass, e.g.::
def checkpermission(self, client, request): return client.editable
:return: boolean """ raise NotImplementedError()
This checks a property of the target client alone (whether it is generally "editable"), again with no reference to request.credential, the authenticated token object returned earlier by authenticatetoken and stored on the request specifically so that later steps can check it:
python def createconfigurationresponse(self, request): token = self.authenticatetoken(request) if not token: raise AccessDeniedError()
request.credential = token
client = self.authenticateclient(request) ... if not self.checkpermission(client, request): raise UnauthorizedClientError(...)
request.credential is set specifically so that a binding check can be performed downstream, but neither documented example ever reads it. Following both examples as written produces an implementation where the only requirements to access, modify, or delete a client's registration are: possessing any valid registrationaccesstoken for any client, and knowing or guessing the target clientid.
This is meaningfully different from how the equivalent example is written for the token introspection endpoint (RFC 7662) elsewhere in the same codebase, which does correctly demonstrate checking the authenticated caller's own identity (authlib/oauth2/rfc7662/introspection.py):
python def checkpermission(self, token, client, request): """Check if the request has permission to introspect the token. Developers MUST implement this method::
def checkpermission(self, token, client, request): # only allow a special client to introspect the token return client.clientid == "introspectionclient" """
In that endpoint, client represents the already-authenticated caller (verified through normal client credential authentication earlier in the flow), so checking a property of client is meaningful authorization logic. In the RFC 7592 endpoint, client instead represents the target being acted upon, not the caller, so the same style of example is actively misleading: it looks like a reasonable authorization check but performs none of the binding the protocol requires.
No file anywhere in the repository, including the Flask, Django, and SQLAlchemy integration modules, provides a complete, corrected reference implementation of ClientConfigurationEndpoint. The misleading docstring examples are the only guidance shipped for this endpoint.
Realistic exploitability
RFC 7591 dynamic client registration is commonly deployed without requiring an initial access token, since the specification explicitly anticipates open, self-service registration as a normal deployment model. Under that common configuration, an attacker can freely self-register their own throwaway client with no authentication at all, receive a valid registrationaccesstoken scoped to that throwaway client, and then present that same token against /register/{targetclientid} for any other client, since neither documented example checks that the token corresponds to the target. If the target client's editable property (or whatever equivalent the developer implements based on the documented example) is true, an attacker can read the victim client's full registration including its metadata, update it (for example, changing redirecturis to an attacker-controlled endpoint, enabling authorization code or token interception against that client's users), or delete it outright.
Reproduction
1. Deploy an authorization server using ClientConfigurationEndpoint with authenticateclient and checkpermission implemented exactly as documented in the class's own docstrings. 2. As an attacker, register a new client via the RFC 7591 registration endpoint (commonly open/anonymous), obtaining clientidA and registrationaccesstokenA. 3. Identify or guess clientidB, belonging to a different, unrelated client. 4. Send GET /register/clientidB (or PUT/DELETE) with Authorization: Bearer registrationaccesstokenA, and clientid set to clientidB in the request body for the PUT case. 5. authenticatetoken succeeds because registrationaccesstokenA is a valid token. authenticateclient succeeds because it looks up clientidB directly from the payload, ignoring which token was presented. checkpermission succeeds because it only checks clientB.editable, not whether registrationaccesstokenA has any relationship to clientB. The request proceeds and returns, modifies, or deletes client B's registration.
Impact
Full read, modify, and delete access to any other client's registration record, for any party able to obtain a valid registrationaccesstoken for any client of their own. In an open dynamic registration deployment this reduces to no meaningful barrier at all, since attackers can self-issue their own qualifying token for free. Impact includes disclosure of client metadata, redirect URI hijacking enabling authorization code or token interception, and denial of service via deletion of arbitrary client registrations.
Suggested fix
Update the documented example for checkpermission (or authenticateclient) to explicitly demonstrate binding the authenticated token to the target client, for example:
python def checkpermission(self, client, request): return request.credential.clientid == client.getclientid()
and add an explicit warning in both docstrings that omitting this comparison results in a complete authorization bypass on this endpoint. Consider also shipping a complete, correct reference implementation of ClientConfigurationEndpoint in the Flask/Django/SQLAlchemy integration modules, since none currently exists.
---
Affected products
Ecosystem: pip Package name: Authlib Affected versions: 1.7.2 Patched versions: 1.9.1
Severity
Privileges Required is Low, reflecting that the attacker needs some registrationaccesstoken of their own, which under the common open dynamic registration deployment model is trivially self-issued. This is a documentation/reference-implementation issue rather than a bug the library enforces unconditionally on every deployment, since authenticateclient and checkpermission are abstract methods a developer must implement; the finding is that the only guidance provided for implementing them correctly is, itself, exploitable if followed as written.
Other sources
Authlib is a Python library which builds OAuth and OpenID Connect servers. From 0.15 until 1.9.1, the documented ClientConfigurationEndpoint.authenticateclient and ClientConfigurationEndpoint.checkpermission reference implementations look up a target client from request-controlled clientid data and check only whether that target is editable, without verifying that request.credential belongs to the target client. Deployments following both examples can allow a client holding any valid registration access token to read, modify, or delete another client's registration. Changing redirecturis can enable authorization code or token interception, while deleting registrations can deny service to affected clients. This issue is fixed in version 1.9.1.
— Ubuntu
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/python-authlibto a version that resolves this vulnerability.Fixed in 1.9.1-1 - Upgrade
Upgrade
pip/Authlibto a version that resolves this vulnerability.Fixed in 1.9.1 - Upgrade
Upgrade
pip/authlibto a version that resolves this vulnerability.Fixed in 1.9.1 - Upgrade
Upgrade
Authlibto a version that resolves this vulnerability.Fixed in 1.9.1 - Compensating control
In ClientConfigurationEndpoint, verify that the authenticated registration access token belongs to the target client before allowing read, update, or delete operations; for example, require request.credential.client_id == client.get_client_id() and reject requests that fail this comparison.
Event History
Frequently Asked Questions
Which deployments are exposed?
Deployments using Authlib from 0.15 through 1.9.0 may be exposed if they implemented both the documented ClientConfigurationEndpoint.authenticate_client and ClientConfigurationEndpoint.check_permission examples. The issue affects OAuth or OpenID Connect server deployments that rely on those reference implementations for dynamic client registration management.
What does an attacker need to exploit this?
An attacker needs a valid registration access token for any client. With that token, they can target another client by supplying its client_id, because the vulnerable examples do not verify that the credential belongs to the target client.
What could an attacker do with another client's registration?
They can read, modify, or delete the other client's registration. Changing redirect_uris can enable authorization code or token interception, and deleting a registration can deny service to the affected client.
What should be done if upgrading is not immediately possible?
Update the authentication and permission logic so that request.credential is verified as belonging to the client identified by the request's client_id before allowing registration access. The documented examples' editable-client check alone is insufficient.
How can I determine whether my implementation is affected?
Review custom ClientConfigurationEndpoint.authenticate_client and ClientConfigurationEndpoint.check_permission implementations based on Authlib documentation. They are affected if they obtain the target client from request-controlled client_id data and only check that it is editable, without checking that request.credential belongs to that target client.