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
- OWASP MCP Top 10: MCP01:2025 (Token Mismanagement & Secret Exposure)
- OWASP Agentic Top 10: ASI03 (Identity and Privilege Abuse)
- Adversa AI MCP Top 25 (AAK-defined ids): ADV-AUTH-10
- CSA AI Controls Matrix (AICM): IAM-01
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.