Summary
Pomerium has an authentication bypass in its MCP token endpoint: requests from client_secret_basic clients can skip client secret verification. If an attacker has an intercepted authorization code or refresh token, they may redeem it with any secret and obtain the victim's access tokens.
Affected context
The issue affects Pomerium versions from 0.30.0 to before 0.34.0, in the MCP token endpoint at /.pomerium/mcp/token. It becomes relevant when the endpoint handles a token request for a client_secret_basic client without verifying the supplied client secret.
Exploit preconditions
- Attack surface: Pomerium's MCP token endpoint
- Required access: An intercepted authorization code or refresh token belonging to a victim
- Trigger point: Redemption of that code or token at
/.pomerium/mcp/token - Why exploitation is possible: The endpoint skips client secret verification for
client_secret_basicclients, allowing redemption with an arbitrary secret
Why this happens
The token endpoint does not consistently enforce client authentication for client_secret_basic clients. This is an authentication enforcement failure mapped to CWE-287: Improper Authentication: possession of a code or refresh token is sufficient to reach token issuance even when the required client secret is not verified.
Potential impact
- An attacker may obtain a victim's access tokens if they possess an intercepted authorization code or refresh token.
- Stolen tokens could allow unauthorized access to resources available to the victim.
- The impact may extend to connected services, depending on token scope and deployment configuration.
General mitigation guidance
Defensive patterns include consistently verifying client credentials before issuing or refreshing tokens and rejecting requests that do not meet the configured client authentication method. Treat authorization codes and refresh tokens as sensitive, short-lived credentials; limit their exposure and scope, and apply least privilege to the resources they authorize. Ensure token handling follows secure defaults and that authentication checks cannot be bypassed by alternate request paths.
How teams detect issues like this
- Review token endpoint code paths to confirm that every configured client authentication method is verified before token issuance.
- Use static analysis or code review to identify branches where credential checks are skipped or inconsistently applied.
- Monitor token endpoint logs for suspicious redemptions, including repeated attempts with varying client credentials or unusual use of authorization codes and refresh tokens.
- Enforce policies requiring authenticated clients and consistent validation across token grant flows.

