Skip to main content
Mallory
← Back to News
ai-platform-securityendpoint-software-vulnerabilitycredential-access-methodinitial-access-method

Vulnerabilities in Anthropic Claude Code Enable Code Execution and API Key Exfiltration

Emerging Technology Risk · 6 sources · Updated 5mo ago · First seen Feb 25, 2026

Vulnerabilities in Anthropic Claude Code Enable Code Execution and API Key Exfiltration

Security researchers disclosed multiple vulnerabilities in Anthropic’s Claude Code AI coding assistant that could enable arbitrary command execution and exfiltration of Anthropic API credentials when developers clone/open a malicious repository. Check Point Research reported the issues abuse Claude Code configuration and initialization paths—particularly project hooks (e.g., untrusted .claude/settings.json), Model Context Protocol (MCP) servers, and environment variables—to trigger shell command execution and data theft. Anthropic’s advisory for CVE-2026-21852 describes a project-load flow where a crafted repo can set ANTHROPIC_BASE_URL to an attacker-controlled endpoint, causing Claude Code to send API requests before the trust prompt is shown, potentially leaking the user’s API key.

The disclosed issues include two high-severity code-injection paths (CVSS 8.7) and one information-disclosure flaw (CVSS 5.3): a consent-bypass/hook-based injection issue fixed in Claude Code 1.0.87 (Sept 2025), CVE-2025-59536 fixed in 1.0.111 (Oct 2025), and CVE-2026-21852 fixed in 2.0.65 (Jan 2026). Separate coverage framed Anthropic-related developments as market-moving, noting investor attention around Anthropic’s AI code-security tooling; however, the actionable security impact in this reporting is the risk that simply opening an attacker-controlled repository can lead to RCE and credential leakage, reinforcing the need to treat untrusted repos and tool initialization behaviors as a supply-chain and developer-workstation risk.

Why it matters

Impact assessment

Claude Code users who open or clone untrusted repositories are exposed to developer-workstation compromise and Anthropic API credential theft. The primary affected population is software developers, security engineers, and CI/CD environments using Claude Code, with secondary risk to organizations whose source code, secrets, cloud-connected AI workflows, and build pipelines are reachable from those endpoints.

Impact severity is high because successful exploitation can execute attacker-controlled commands with the user’s full privileges, steal secrets such as SSH keys and tokens, install persistence, and redirect authenticated Anthropic API traffic to attacker infrastructure. Exposure is targeted rather than indiscriminate, but the trigger condition is low-friction: opening a crafted repository or invoking Claude Code in CI/CD can be sufficient, and reporting describes proof-of-concept exploitation against current Claude Code builds and zero-click CI/CD scenarios.

Supporting facts

  • Affected product: Anthropic Claude Code CLI.
  • Affected users: developers and organizations using Claude Code on workstations and in CI/CD pipelines.
  • Trigger condition: cloning or opening a malicious repository in Claude Code.
  • Reported outcomes: arbitrary command execution, API key exfiltration, theft of local secrets, access to other projects, backdoor installation, and command-and-control connectivity.
  • Privilege level: MCP servers reportedly run as native OS processes with the full privileges of the user running Claude Code and are not sandboxed.
  • CI/CD risk: Adversa reported a zero-click variant when Claude Code is invoked through an SDK without an interactive trust prompt.
  • Scope: supply-chain style exposure through repository-contained configuration files such as .claude/settings.json and .mcp.json.
  • Known activity: public proof-of-concept exploit “TrustFall” was demonstrated; references describe exploitation mechanics but do not cite broad in-the-wild criminal exploitation campaigns.
  • Additional ecosystem note: one reference claims the broader attack class may affect Gemini CLI, Cursor CLI, and Copilot CLI, but the detailed validated exploitation in this story centers on Claude Code.
  • Non-actionable reference: the meme/market coverage does not materially change the security impact assessment.

Entities

  • Anthropic
  • Claude Code
  • Check Point Research
  • Adversa AI
  • Aviv Donenfeld
  • Oded Vanunu
  • Rony Utevsky
  • Alex Polyakov
  • Sergey Malenkovich
New surface, new adversariesTrack how attackers are adapting to this technology.
Track this risk
Event timeline

How this story unfolded

Events from the most recent confirmed update back to the earliest known activity.

5 events · Feb 25, 2026 – May 7, 2026
  1. May 7, 20267mo ago

    Adversa AI discloses TrustFall Claude Code execution exploit

    Adversa AI disclosed a proof-of-concept exploit called TrustFall showing how a malicious repository could trigger attacker-controlled code execution in Claude Code after a user accepts a routine trust prompt in v2.1. The researchers warned the issue could enable full machine compromise, secret and token theft, backdoor installation, and unattended impact in CI/CD environments, while Anthropic reportedly said the behavior falls outside its threat model because execution follows user consent.

    'TrustFall' Exposes Claude Code Execution Risk
  2. Feb 27, 20269mo ago

    Public PoC repo released for Claude Code vulnerabilities

    A GitHub repository was published demonstrating three previously disclosed Claude Code vulnerabilities, including hooks consent bypass, MCP server configuration injection, and API key exfiltration via base URL manipulation. The project included malicious demo configurations, an attacker server, a MITM proxy, and a scanner for detecting vulnerable repository patterns, expanding public technical detail around the flaws.

    GitHub - atiilla/CVE-2026-21852-PoC · GitHub
  3. Feb 25, 20269mo ago

    Anthropic's Claude Code Security launch triggers cybersecurity stock selloff

    Anthropic's release of its AI-powered code security tool, Claude Code Security, reportedly prompted a short-term selloff in cybersecurity stocks. Investor Nick Davidov said the reaction did not alter his firm's long-term view that AI-generated code and agent-related risks will increase demand for security products.

  4. Feb 25, 20269mo ago

    Check Point discloses Claude Code RCE and API key theft flaws

    Check Point researchers publicly disclosed multiple vulnerabilities in Anthropic's Claude Code affecting Hooks, Model Context Protocol servers, and environment variable handling. The researchers said malicious repository configuration files could be abused to execute arbitrary shell commands and leak API keys to attacker-controlled endpoints, potentially enabling follow-on access to AI infrastructure and cloud-stored data.

  5. Feb 25, 20269mo ago

    Anthropic patches multiple Claude Code vulnerabilities

    Anthropic fixed several flaws in Claude Code across versions 1.0.87, 1.0.111, and 2.0.65, including CVE-2025-59536 and CVE-2026-21852. The vulnerabilities could enable remote code execution, silent tool interaction, and exfiltration of Anthropic API credentials when users opened untrusted repositories.

Linked entities

Related entities

Vulnerabilities, threat actors, malware, products, organizations, and breaches Mallory has linked to this story.

Open in app →

Affected products

1 linked
Claude Code

Organizations

1 linked
Anthropic
Do you run this?Follow how adversaries are adapting to this technology, and where it touches your stack today.
Track This Risk
Mallory platform

See the full picture, correlated to your attack surface.

This page covers what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which threat actors are using it right now, and what to deploy next.

Exposure mappingMap indicators from this story to your assets and identify affected systems in minutes.
Threat actor evidenceEvery observed campaign, victim, and pivot linked to actors named in this story.
Associated malwareMalware, exploits, and IOCs connected to the activity described here.
Detection signaturesYARA, Sigma, and Snort rules deployed to your SIEM as soon as they’re published.
Scheduled alertsGet matching new stories delivered to your team as they break, not the next morning.
AI threadsAsk questions about this story and take action on the answers.