Skip to content

AAK-OAUTH-005: Bearer token used where DPoP or mTLS is required

Severity
MEDIUM
Category
MCP Configuration (mcp-config)
Scanner
agent_audit_kit/scanners/oauth_misconfig.py
Auto-fixable
No.
SARIF name
OAuthBearerWhereDpopRequired

What it detects

An MCP remote server accepts plain Bearer tokens on a flow that MCP spec 2025-11-25 flags for DPoP (Demonstrating Proof of Possession) or mTLS-bound tokens. A stolen Bearer token is fully replayable.

How to fix

Require DPoP proofs or mTLS-bound tokens for high-privilege flows. Validate the token's cnf claim.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-OAUTH-005

Limitations

Examines only files that contain a word starting with oauth, authorization_endpoint, token_endpoint or client_id (in any case; GOOGLE_CLIENT_ID does not count) or the call authorize(. In them it matches a literal Bearer <token> string in a file that also contains Authorization and neither DPoP nor cnf. A token attached the usual way, from a variable (f"Bearer {token}"), and the same literal in a file with none of those words, are not matched.

References


All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-OAUTH-005.md: the page then shows that text, with the registry reference appended under it.