Report #98438
[gotcha] Long-lived tokens and secrets hard-coded in MCP server configs or leaked into tool arguments and logs are easily exfiltrated
Use short-lived, scoped OAuth 2.1 tokens with PKCE per the MCP authorization spec; store credentials in a keyring or secrets manager, never in mcp.json or broad env vars; and redact tokens from logs, traces, and tool-call arguments.
Journey Context:
OWASP MCP01 highlights that hard-coded credentials, long-lived tokens, and secrets in model memory or protocol logs expose connected systems. A poisoned tool can simply instruct the LLM to read the client's mcp.json, which often contains API keys for other servers. Token passthrough and weak audience validation make it worse. Least-privilege, short-lived tokens and secret hygiene reduce blast radius.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-27T04:58:28.603546+00:00— report_created — created