Summary
OpenBao has an authentication bypass in its OIDC token endpoint when a public client is configured with the client_credentials grant enabled. An unauthenticated caller who knows the client ID may obtain an ID token and impersonate that client without providing a secret.
Affected context
The issue affects OpenBao deployments in the affected version ranges described for releases before 2.6.5 and 2.7.2. It becomes relevant where an OIDC provider has a public client with client_credentials enabled and callers can reach the provider's token endpoint.
Exploit preconditions
- Attack surface: The OIDC provider token endpoint,
identity/oidc/provider/<name>/token, must be reachable. - Required access: No authentication or client secret is required; the caller must know the public client's
client_id. - Trigger point: A token request to the provider endpoint for a public client with
client_credentialsenabled. - Why exploitation is possible: The request can obtain an ID token without the expected client authentication.
Why this happens
The issue is an authentication validation failure mapped to CWE-287: Improper Authentication. The token flow permits a public client to obtain an ID token through the client credentials grant without verifying a secret or equivalent proof of client identity. This allows knowledge of a client identifier to be treated as sufficient authentication.
Potential impact
- An unauthenticated caller may obtain OIDC ID tokens for a public client.
- A caller could impersonate the affected client to systems that trust those tokens.
- Downstream services may grant access based on the forged client identity or associated claims.
General mitigation guidance
Defensive patterns focus on ensuring that token issuance is backed by appropriate client authentication and grant validation.
- Disable
client_credentialsfor public clients unless a well-defined, secure use case requires it. - Require an appropriate authentication or proof-of-possession mechanism for clients allowed to use this grant.
- Validate client type, permitted grants, requested scopes, and token audience before issuing tokens.
- Limit token privileges and downstream authorization to the minimum required.
- Reduce exposure of token endpoints and monitor changes to OIDC client configuration.
How teams detect issues like this
- Review OIDC provider configurations for public clients with
client_credentialsenabled. - Audit token endpoint logs for unauthenticated requests and unusual ID token issuance patterns.
- Use static analysis and code review to check that token issuance verifies client authentication against the configured client type and grant.
- Enforce policy checks that reject unsafe grant configurations for public clients.

