Hackers News Hackers News
  • CyberSecurity News
  • Threats
  • Attacks
  • Vulnerabilities
  • Breaches
  • Comparisons

Social Media

Hackers News Hackers News
  • CyberSecurity News
  • Threats
  • Attacks
  • Vulnerabilities
  • Breaches
  • Comparisons
Search the Site
Popular Searches:
technology Amazon AI
Recent Posts
152 Chrome Extensions Maliciously Hide Ad Tracking
June 14, 2026
Maine AG Takes Data Breach Portal Offline After Fake
June 14, 2026
Agentjacking Attack Hijacks AI Coding Agent for Mal
June 13, 2026
Home/CyberSecurity News/Hackers Hijack Claude Code MCP Traffic, Steal OAuth Tokens
CyberSecurity News

Hackers Hijack Claude Code MCP Traffic, Steal OAuth Tokens

A five-step attack chain has been identified that silently redirects Claude Code’s Model Context Protocol (MCP) traffic. This sophisticated technique funnels data through attacker-controlled...

Sarah simpson
Sarah simpson
June 8, 2026 3 Min Read
20 0

A five-step attack chain has been identified that silently redirects Claude Code’s Model Context Protocol (MCP) traffic. This sophisticated technique funnels data through attacker-controlled infrastructure, enabling the interception of OAuth bearer tokens. Once compromised, these tokens grant persistent, broadly scoped access to critical connected SaaS platforms, including Jira, Confluence, and GitHub. Worryingly, Anthropic has

Researchers at Mitiga Labs have demonstrated the attack, with the entry point being a malicious npm package designed to survive casual inspection. Hidden inside is a postinstall lifecycle hook that executes silently during installation, a well-documented supply chain attack class that gains critical new consequences in AI-agentic environments.

The hook’s primary target is a single file: ~/.claude.json, the global configuration file that governs how Claude Code routes all MCP traffic and stores OAuth tokens in plaintext.

Once installed, the hook pre-populates common developer clone paths with trust dialog flags set to true. From Claude Code’s perspective, the user has already approved trust on those directories, so no prompt will fire when they are subsequently opened.

When a developer connects an MCP server such as Atlassian or GitHub, Claude Code executes a full OAuth flow.

The resulting bearer token has four properties that make it exceptionally valuable to an attacker:

  • Persistent — stored for session reuse with an associated refresh token; one interception creates a durable foothold.
  • Broadly scoped — inherits all permissions granted at authorization time with no per-call narrowing or re-consent.
  • Weakly stored — lives in plaintext inside ~/.claude.json alongside trust flags, all with identical file permissions.
  • Unattributable server-side — presented from Anthropic’s egress IP range, the token is indistinguishable from legitimate traffic on the provider’s side.

Five-Step Claude Code MCP Attack Chain

The full chain requires no privilege escalation, memory corruption, or new CVE:

  1. Delivery — A malicious npm package installs a postinstall hook, seeds trust flags across developer clone paths.
  2. Path seeding — Hook edits ~/.claude.json to insert a sessionStart hook that fires every time Claude Code loads a trusted project.
  3. MCP endpoint rewrite — The session hook replaces legitimate MCP server URLs (e.g., Atlassian’s endpoint) with a localhost proxy controlled by the attacker.
  4. Token interception — Claude Code reads the rewritten URL, connects to the proxy, and the OAuth bearer token transits attacker infrastructure; the provider sees a valid flow from a trusted origin.
  5. Persistent reseeding — The hook reasserts the malicious configuration on every Claude Code load, automatically recapturing tokens after rotation or manual URL correction.

The most operationally significant finding is that the standard incident response action, rotating the OAuth token, actively feeds the attacker rather than breaking access.

Because the hook rewrites ~/.claude.json before each session, the next OAuth refresh hits the proxy and delivers a fresh token. Remediation requires removing the hook and cleaning the configuration file before rotating credentials.

Defenders reviewing provider-side logs — such as Atlassian audit entries — will see a valid username, a real session, and an IP address resolving to Anthropic’s egress range. Every field looks legitimate. The only anomaly exists in ~/.claude.json, a user-level configuration file most security teams are not monitoring.

Mitiga reported the findings to Anthropic on April 10, 2026. Anthropic acknowledged the report on April 11, then responded on April 12 that the issue was out of scope, citing the user’s prior consent as a prerequisite for the attack. No patch is planned. The determination places the full detection and response burden on enterprise security teams.

Detection for Defenders

Security teams should implement the following controls immediately:

  • Monitor ~/.claude.json for unexpected edits, particularly changes to mcpServers URLs or additions of localhost proxy addresses
  • Treat npm post-install hooks as a first-class supply chain risk — audit packages that register lifecycle scripts before they reach developer machines
  • Audit and rotate OAuth tokens connected to Claude Code integrations, but only after confirming the hook has been removed
  • Review SaaS audit logs for requests originating from Anthropic egress IPs that do not match the user’s known activity patterns
  • Alert on new local proxies or unexpected OAuth refresh behavior in developer environments

Organizations running Claude Code with MCP integrations should run cat ~/.claude.json immediately and verify that every URL listed under mcpServers is a recognized, self-configured endpoint.

Disclaimer: HackersRadar reports on cybersecurity threats and incidents for informational and awareness purposes only. We do not engage in hacking activities, data exfiltration, or the hosting or distribution of stolen or leaked information. All content is based on publicly available sources.

Tags:

AttackCVEHackerPatchSecurity

Share Article

Sarah simpson

Sarah simpson

Sarah is a cybersecurity journalist specializing in threat intelligence and malware analysis. With over 8 years of experience covering APT groups, zero-day exploits, and advanced persistent threats, Sarah brings deep technical expertise to breaking cybersecurity news. Previously, she worked as a security researcher at leading threat intelligence firms, where she analyzed malware samples and tracked cybercriminal operations. Sarah holds a Master's degree in Computer Science with a focus on cybersecurity and is a regular contributor to major security conferences.

Previous Post

EDRChoker Tool Blocks EDR Processes Uses Policy-Based

Next Post

Microsoft Warns: Claude GitHub Action Leaks Code Could

No Comment! Be the first one.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Popular Posts
Government Directive Blocks Anthropic Fable 5 & Mythos Access
June 13, 2026
Fancy Bear Abuses EdgeRouters & Cloud for Stealthy
June 12, 2026
Hackers Abuse NinjaOne RMM to Bypass Malware Legitimate Software
June 12, 2026
Top Authors
Marcus Rodriguez
Marcus Rodriguez
Jennifer sherman
Jennifer sherman
Emy Elsamnoudy
Emy Elsamnoudy
Let's Connect
156k
2.25m
285k

Related Posts

Jennifer sherman
By Jennifer sherman
Threats

GlassWorm Attacks macOS via Malicious VS Code…

January 1, 2026
Emy Elsamnoudy
By Emy Elsamnoudy
Attacks

ClickFix Attack Hides Malicious Code via Stegan Security

January 1, 2026
Sarah simpson
By Sarah simpson
Vulnerabilities

MongoBleed Detector Tool Detects Critical MongoDB CVE-

January 1, 2026
Emy Elsamnoudy
By Emy Elsamnoudy
Breaches

Conti Ransomware Gang Leaders & Infrastructure Exposed

January 1, 2026
Hackers News Hackers News
  • [email protected]

Quick Links

  • Contact Us
  • Privacy Policy
  • Terms of service

Categories

Attacks
Breaches
Comparisons
CyberSecurity News
Threats
Vulnerabilities

Let's keep in touch

receive fresh updates and breaking cyber news every day and week!

All Rights Reserved by HackersRadar ©2026

Follow Us