A SecretSpec audit found Claude Code 2.1.257 storing MCP OAuth credentials as plaintext JSON on Linux, while Mitiga Labs demonstrated that a user-level npm hook can redirect MCP traffic and capture refreshed tokens. The chain needs code execution and a permissive configuration, but its persistence and normal-looking provider logs make file and endpoint monitoring as important as token rotation.
0600 rather than encryption.Anthropic’s Claude Code is an agentic coding CLI that brokers access to services such as Jira, GitHub, Slack and databases through the Model Context Protocol (MCP). The evidence points to two connected but distinct weaknesses: how credentials are persisted locally and how the client decides where MCP traffic goes.

Mitiga’s proof-of-concept configuration shows a SessionStart hook that runs a shell script when Claude Code loads a trusted project. Source: www.mitiga.io.
Domen Kožar, the developer behind the SecretSpec credential-management project and author of its 0.20 release, inspected Claude Code 2.1.257 after logging in to several remote MCP servers. His audit found a top-level mcpOAuth object in ~/.claude/.credentials.json containing an access token, client ID, discovery state, redirect URI and server URL. The file had Unix mode 0600, which limits ordinary reads to the account owner, but the values were still readable plaintext for malware or another process running as that user.
The platform’s storage differs by operating system. SecretSpec says macOS uses the encrypted Keychain and falls back to the JSON file if the Keychain is unavailable. Windows uses a file under the user profile and its access controls. Netwrix’s survey adds a sharper edge case: a Windows-side file mounted in WSL can inherit 0777 permissions and become readable to any process in that Linux environment. That is a WSL-specific exposure, not the mode used by a native Linux installation.
OAuth narrows permissions and supplies expiry, refresh and revocation mechanisms; it does not specify the client’s local vault. A stolen bearer token can be replayed until it expires or is revoked, and a refresh token can extend the window. The security distinction matters because calling a credential “stored securely” can describe file permissions without describing encryption at rest.
The retained reports do not establish a single universal token path. SecretSpec observed mcpOAuth in ~/.claude/.credentials.json. Mitiga’s attack uses ~/.claude.json as the global MCP configuration and trust control point; SecurityWeek’s account also describes OAuth tokens in that file. The sources therefore support a routing attack through ~/.claude.json, but not a claim that every build duplicates all tokens in both locations.
The aggregation problem is broader than Claude Code. Netwrix examined 14 AI tools and cites Trend Micro’s finding that 48% of 19,402 MCP server implementations recommend plaintext credential storage. That percentage describes recommendations across the MCP ecosystem, not the share of Claude Code installations. A single MCP configuration can nevertheless bring GitHub, Azure DevOps, Slack, Jira and database credentials under one user-writable boundary.

Mitiga’s redacted terminal demonstration shows a captured Atlassian MCP token being used to authenticate, retrieve account information, and query Jira issues. Source: www.mitiga.io.
Mitiga Labs, a security-research team whose earlier work examined AI-agent supply chains, demonstrated a five-step chain rather than a memory-corruption exploit. A malicious npm package runs a post-install hook as the developer, targets common repository clone paths and pre-seeds Claude Code trust flags. It then edits ~/.claude.json so an MCP server URL points to a localhost proxy.
When Claude Code next initializes or refreshes the MCP session, the bearer token passes through that proxy before reaching the legitimate provider. The user sees a functioning integration. Mitiga says provider logs can still show the real user, a valid OAuth grant and an origin associated with Anthropic’s egress. SecurityWeek’s account characterizes the captured token as an MFA-bypassing credential with the user’s existing permissions; that is a description of the token’s potential use, not evidence that Mitiga performed a remote account takeover.
The precondition limits the claim. The attacker must first get code installed under the user account, and the victim must have a dynamically authorized MCP server. Mitiga reported the mechanism to Anthropic on April 10, 2026; it says Anthropic replied two days later that the scenario was out of scope because the initial install and consent were treated as user-authorized. SecurityWeek independently reports the same disclosure dates and response.
Persistence is the more consequential feature after that foothold. The hook runs again when a trusted project opens, restores the proxy if a user edits the URL, and can intercept the next refresh after a token rotation. Rotation therefore helps only after the hook and configuration rewrite are removed. It is not a substitute for investigating how the endpoint changed.

Mitiga’s illustrative audit-log screenshot shows how MCP-labelled Jira and Confluence activity can appear routine to provider-side monitoring. Source: www.mitiga.io.
Each individual event can look routine: a file edit, a localhost listener, an OAuth refresh or a Jira query. Defenders need a combined trail. Mitiga recommends baselining approved MCP endpoints, watching ~/.claude.json and project-level MCP files, alerting on new local proxies and reviewing downstream SaaS actions that do not match the user’s normal work. The survey also advises avoiding --dangerously-skip-permissions on machines with real credentials and using environment-variable references instead of inline tokens.
Those measures address the attack path, not the storage design. A mode-0600 file remains accessible to malicious code with the developer’s user context, and a valid-token audit trail may conceal the redirection that produced the access.
Kožar proposes a replaceable credential-store interface. SecretSpec 0.20 advertises 33 provider integrations, including keyrings, password managers, encrypted files and cloud secret managers, with a suggested get/set/delete surface. That is a vendor proposal, not an Anthropic feature. Kožar’s comparison notes that OpenAI Codex exposes auto, file and keyring choices for MCP OAuth credentials; it is a narrower precedent, not proof that every keyring deployment is safe.
The next decision is whether Claude Code will make an encrypted or policy-controlled Linux backend selectable and treat trust-file and MCP endpoint rewrites as security events. Until Anthropic documents that control—or the evidence shows a changed implementation—teams must assume that token rotation, endpoint integrity and local process access are separate parts of the same incident.
Get concise AI news and useful context from the Magica team.
Read the newsletterAlibaba says Qwen4-Max reduces average task costs by 62% on its workplace benchmark. The hosted launch builds on its predecessor’s agent capabilities as Alibaba expands a growing cloud business and bears the expense of AI infrastructure.
The FBI warns that ARTEX can accelerate intrusions, with some reaching privileged access in under three hours. Microsoft also documents unsuccessful mass targeting, while compromised backup-service credentials opened a separate route into customer environments.
Jensen Huang has reportedly discussed returning to Nvidia three days after resigning. Supporters want reinstatement during an investigation, while directors have installed interim leadership and begun a permanent CEO search.
House China committee chairman John Moolenaar demanded answers from Commerce Secretary Howard Lutnick over delayed restrictions on Nvidia customer Megaspeed. The dispute concerns enforcement, overseas access to advanced chips and commercial influence as President Donald Trump prepares to visit China.
Apple reportedly still aims to unveil iPhone-linked glasses at WWDC 2027 and ship before year-end. Siri control of existing apps is the software bet, but delays cloud the schedule and Meta already has an established eyewear lineup.
Treasury Secretary Scott Bessent urged Nvidia to recruit an outside CEO and explain within 10 days whether suspect chip sales inflated earnings. The board is considering internal and external candidates, while export enforcement also faces scrutiny.
Congressional scrutiny and company investigations are testing what Nvidia knew about Megaspeed, a Singapore cloud operator whose Malaysian subsidiary bought nearly $2 billion of its technology. Megaspeed denies wrongdoing; the available reporting has not conclusively traced suspected chip diversion to China.
Commerce Secretary Howard Lutnick is backing narrower restrictions on Chinese access to overseas AI computing, according to a report examining his former firm’s financing relationships. Bitdeer filings establish Cantor’s role and the scale of its client’s planned expansion, but do not establish improper influence on policy.
Microsoft said services were fully restored on Saturday after a global Microsoft 365 outage disrupted email, healthcare communications and public services. It blamed an earlier network capacity upgrade exposed by a later change, with a full technical review still to come.
Cursor says a key exposed by Fireworks led an attacker to unredacted credentials in historical coding-agent records and then its extension cache. Up to 5,000 users potentially received malicious Claude Code builds. Cursor has moved inference off Fireworks; successful endpoint compromises remain uncounted.
Police are investigating a top tax-accountant exam scorer's admission of AI-assisted cheating, while the government reviews national qualification tests held in 2026 and prepares stronger controls.
An early tally puts Japanese listed companies’ first-half net profit growth at 43.2%, led by manufacturers. Filings show AI component demand alongside currency benefits and non-AI earnings gains, while procurement delays and canceled infrastructure reservations expose the costs of expansion.
TSMC plans to back promising chip startups through a new investment arm, alongside separate commitments to OpenAI and Anthropic. The strategy reaches toward future customers and the AI developers shaping chip demand, but the investment rights remain unclear.
Nidus has raised $30 million across pre-seed and seed rounds to automate wire processing in existing U.S. defense factories. Its founders bring manufacturing and government-deployment experience, but customer access and proprietary data still need to translate into measurable production gains.
Nebuly is funding US and European expansion for its AI business-value platform. Adjustable assumptions and private deployment are part of its pitch, but rivals offer similar measurement tools and verified customer returns remain undisclosed.
Han Won-seok says he used a miniature camera, generative AI and a smartphone in tax accountant and CPA exams. His confession puts scrutiny on exam security after proctors reported no suspicious behavior.
Veteran songwriting team Glorywave used Suno to turn human-written lyrics into Meomuru’s chart-topping ballad. Recording revenue is settled separately, but songwriting royalties remain unavailable through Korea’s collecting association as rules for human contributions to AI-assisted music remain unresolved.
Chinese AI developers and optical suppliers fell as investors feared tougher US chip restrictions after Jensen Huang’s departure from Nvidia. Domestic chipmakers rallied, exposing a divide between companies that need advanced processors and those hoping to replace them.
Reports linked to AI and child sexual exploitation rose from about 4,700 in 2023 to more than 400,000 in 2025, Childlight finds. The increase exposes growing threats and weaknesses in reporting systems, but does not measure unique victims or confirmed AI-generated images.
Megaspeed says Alice Huang left on August 30, 2025, and has retained outside lawyers for an internal compliance investigation. Singapore’s inquiry began months before that departure; authorities later found insufficient evidence that Huang had committed a crime, while the investigation into the company continues.