Claude Code OAuth Tokens Can Be Stolen Through Stealthy MCP Hijacking
Mitiga researchers say attackers can silently redirect Claude Code MCP traffic, intercept OAuth tokens, and maintain persistent access to connected SaaS platforms. The post Claude Code OAuth Tokens Can Be Stolen Through Stealthy MCP Hijacking appeared first on SecurityWeek .
AI Analysis
Technical Summary
Mitiga researchers disclosed a vulnerability in Claude Code where attackers can hijack MCP traffic by modifying the ~/.claude.json configuration file to redirect OAuth token traffic through attacker-controlled infrastructure. This is achieved by installing a malicious npm package that sets lifecycle hooks to alter trust dialogs and MCP server URLs silently. The attacker gains persistent man-in-the-middle access to OAuth tokens stored in plaintext, enabling them to access connected SaaS platforms with the victim's permissions. The attack is stealthy, maintaining persistence by automatically restoring malicious settings if changed. Anthropic has declined to address the issue, citing user consent as justification. No patch or official remediation is currently available.
Potential Impact
An attacker who successfully exploits this vulnerability can steal OAuth tokens that serve as master keys to all SaaS platforms connected through Claude Code's MCP. This enables persistent, stealthy access to victim SaaS accounts with the same permissions as the user, bypassing multi-factor authentication. The victim remains unaware as the attack does not disrupt normal operation or trigger visible alerts. The attacker can maintain access even after token rotation or configuration changes, posing a significant risk of unauthorized data access and potential lateral movement within connected SaaS environments.
Mitigation Recommendations
No official fix or patch is currently available, as the vendor Anthropic has classified this issue as out of scope. Mitiga recommends monitoring Claude Code configuration changes, especially modifications to the MCP server URL and the ~/.claude.json file, as well as observing OAuth token refresh behavior and suspicious SaaS API activity. Users should be cautious about installing untrusted npm packages and consider restricting or auditing npm package installations on machines running Claude Code. Since the vulnerability relies on local compromise, endpoint security controls to prevent unauthorized software installation can reduce risk.
Claude Code OAuth Tokens Can Be Stolen Through Stealthy MCP Hijacking
Description
Mitiga researchers say attackers can silently redirect Claude Code MCP traffic, intercept OAuth tokens, and maintain persistent access to connected SaaS platforms. The post Claude Code OAuth Tokens Can Be Stolen Through Stealthy MCP Hijacking appeared first on SecurityWeek .
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Mitiga researchers disclosed a vulnerability in Claude Code where attackers can hijack MCP traffic by modifying the ~/.claude.json configuration file to redirect OAuth token traffic through attacker-controlled infrastructure. This is achieved by installing a malicious npm package that sets lifecycle hooks to alter trust dialogs and MCP server URLs silently. The attacker gains persistent man-in-the-middle access to OAuth tokens stored in plaintext, enabling them to access connected SaaS platforms with the victim's permissions. The attack is stealthy, maintaining persistence by automatically restoring malicious settings if changed. Anthropic has declined to address the issue, citing user consent as justification. No patch or official remediation is currently available.
Potential Impact
An attacker who successfully exploits this vulnerability can steal OAuth tokens that serve as master keys to all SaaS platforms connected through Claude Code's MCP. This enables persistent, stealthy access to victim SaaS accounts with the same permissions as the user, bypassing multi-factor authentication. The victim remains unaware as the attack does not disrupt normal operation or trigger visible alerts. The attacker can maintain access even after token rotation or configuration changes, posing a significant risk of unauthorized data access and potential lateral movement within connected SaaS environments.
Mitigation Recommendations
No official fix or patch is currently available, as the vendor Anthropic has classified this issue as out of scope. Mitiga recommends monitoring Claude Code configuration changes, especially modifications to the MCP server URL and the ~/.claude.json file, as well as observing OAuth token refresh behavior and suspicious SaaS API activity. Users should be cautious about installing untrusted npm packages and consider restricting or auditing npm package installations on machines running Claude Code. Since the vulnerability relies on local compromise, endpoint security controls to prevent unauthorized software installation can reduce risk.
Technical Details
- Article Source
- {"url":"https://www.securityweek.com/claude-code-oauth-tokens-can-be-stolen-through-stealthy-mcp-hijacking/","fetched":true,"fetchedAt":"2026-05-07T14:36:22.881Z","wordCount":1337}
Threat ID: 69fca366cbff5d8610fd4a96
Added to database: 5/7/2026, 2:36:22 PM
Last enriched: 5/7/2026, 2:36:39 PM
Last updated: 5/9/2026, 2:14:55 AM
Views: 29
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.