Claude Code OAuth Tokens Can Be Stolen Through Stealthy MCP Hijacking

Claude Code OAuth Tokens Can Be Stolen Through Stealthy MCP Hijacking

Claude Code OAuth Tokens Can Be Stolen Through Stealthy MCP Hijacking

https://www.securityweek.com/claude-code-oauth-tokens-can-be-stolen-through-stealthy-mcp-hijacking/

Publish Date: 2026-05-07 10:33:06

Source Domain: www.securityweek.com

OAuth token theft vulnerability in Claude Code

Mitiga Labs has exposed a critical vulnerability in the Claude Code agentic system, highlighting the risk of unauthorized OAuth token access. An attacker can execute a stealthy man-in-the-middle attack, enabling them to intercept and redirect output, including OAuth tokens, into their own infrastructure. This occurs if the attacker installs a crafted npm package that hooks into the system’s lifecycle events, thus modifying the main configuration file, ~/.claude.json, in order to redirect MCP server traffic through the attacker’s own server. The consequences include seamless theft of OAuth tokens as the tokens are stored in plain text, which can then be used to bypass MFA and access any integrated tool with the same permissions as the legitimate user. Mitiga Labs emphasizes that users must actively monitor their system activities to detect any unauthorized changes and warns that relying on a future solution from Anthropic is not advisable, given the company’s reluctance to address the disclosed issues.

Key Points:

  • OAuth Token Theft: – The generated text has been blocked by our content filters.