Summary
A Google OAuth provider flaw in MCP Toolbox can bypass audience validation for opaque access tokens when the authentication service enables MCP support without an explicit audience or client ID. As a result, a valid Google access token issued for an unrelated application may grant access to protected tools and connected data backends.
Affected context
The issue occurs in deployments using the Google OAuth provider with mcpEnabled: true while omitting an explicit audience or client ID. Under this configuration, the opaque-token validation path may authenticate a token without confirming that it was intended for the MCP Toolbox service, creating an audience-confusion risk.
Exploit preconditions
- Attack surface: The MCP Toolbox authentication endpoint and protected tool interfaces
- Required access: Possession of any otherwise valid Google OAuth access token, including one issued for another application
- Trigger point: Validation of opaque tokens through the
ValidateMCPAuthpipeline - Configuration condition: MCP authentication is enabled without an explicitly configured audience or client ID
- Why exploitation is possible: The validation flow may establish token validity without enforcing that the token's intended audience matches the toolbox
Why this happens
The underlying bug is an incomplete authentication decision in which token validity is evaluated without consistently binding the token to the intended service. When audience or client identity is absent from configuration, the opaque-token validation path skips an authorization-relevant check and treats a token minted for another ecosystem application as acceptable. This maps to CWE-287: Improper Authentication, because the service does not fully verify that the presented credential authenticates the client or resource it is accessing.
Potential impact
- Unauthorized clients may access protected MCP tools
- Attackers may retrieve or modify data through connected backends, subject to granted tool permissions
- Cross-application token reuse may defeat intended service boundaries
- Sensitive information may be disclosed through authorized integrations
- Downstream systems may be affected by actions performed through improperly authenticated clients
General mitigation guidance
Mitigation generally focuses on making resource and audience binding mandatory for OAuth validation.
Common defensive patterns include:
- Require an explicit audience or client identifier for MCP-enabled authentication
- Reject configurations that omit required token-binding parameters
- Enforce audience, issuer, scope, and intended-resource checks for every token type
- Prefer secure-by-default authentication settings that fail closed when validation context is incomplete
- Limit tool and backend permissions using least privilege and separate sensitive integrations
- Reduce reliance on broadly reusable bearer tokens through narrowly scoped credentials and short lifetimes
How teams detect issues like this
Organizations can identify similar weaknesses through:
- Static analysis and configuration checks for authentication providers lacking audience or client-binding settings
- Code review of branches that conditionally skip issuer, audience, client ID, or scope validation
- Integration tests using valid tokens minted for different applications and resources
- Policy enforcement requiring explicit OAuth resource and audience configuration in deployment manifests
- Runtime monitoring for tokens whose issuer, audience, scopes, or client context do not match the requested MCP service
- Automated security review tools that flag authentication paths with fail-open behavior or incomplete claim validation

