Skip to main content
Mallory
← Back to News
ai-platform-securityendpoint-software-vulnerabilitycredential-access-methodwidely-deployed-product-advisory

Critical Vulnerabilities in Anthropic Claude Code Enable RCE and API Key Theft via Malicious Repositories

Emerging Technology Risk · 9 sources · Updated 5mo ago · First seen Feb 26, 2026

Critical Vulnerabilities in Anthropic Claude Code Enable RCE and API Key Theft via Malicious Repositories

Check Point Research disclosed multiple critical vulnerabilities in Anthropic’s Claude Code AI coding assistant that could allow remote code execution and credential theft when a developer clones and opens an untrusted repository. The reported attack path abuses repository-controlled configuration and automation features (including Hooks, MCP servers, and environment variables) to trigger hidden shell command execution and to exfiltrate Anthropic API credentials, potentially enabling a pivot from a developer workstation into broader enterprise environments where Claude-related workflows and shared resources are accessible.

The issues include consent-bypass and command-execution weaknesses tracked under CVE-2025-59536 (covering closely related flaws involving repository configuration executing commands without adequate user consent) and an API credential exposure issue tracked as CVE-2026-21852, which affected Claude Code versions prior to 2.0.65 and enabled API key theft via malicious project configurations. Anthropic has patched the vulnerabilities and advised users to update to the latest version, while indicating additional hardening measures are planned to reduce supply-chain risk from malicious commits and repository-level configuration abuse.

Why it matters

Impact assessment

Anthropic Claude Code users are exposed to high-risk supply-chain style attacks when developers clone and open untrusted repositories. The primary affected population is software developers, open-source maintainers, and CI/CD environments using Claude Code, with elevated enterprise risk where Anthropic Workspaces or shared development resources are in use.

The impact is severe because successful exploitation can lead to remote code execution on developer workstations, theft of Anthropic API keys, downstream access to shared workspace data, unauthorized modifications, and fraudulent API usage. Exposure is targeted rather than indiscriminate because exploitation requires a malicious repository or malicious commit, but the attack path is practical and low-friction once a victim opens the project.

Supporting facts:

  • Affected product: @anthropic-ai/claude-code.
  • Affected users: developers running Claude Code locally, maintainers reviewing repositories, and CI/CD pipelines using Claude Code in non-interactive mode.
  • Enterprise impact extends to Anthropic Workspaces, where a stolen API key may permit access to shared cloud-stored project files.
  • Reported consequences include read/write/delete access to workspace files, malicious file upload, storage quota exhaustion, billing fraud, and potential reputational damage from supply-chain compromise.
  • Multiple reports describe exploitation as possible by simply opening or running Claude Code in a malicious repository.
  • Public reporting describes demonstrated exploit paths by Check Point Research and Adversa; the content does not provide confirmed in-the-wild exploitation incidents.
  • Anthropic states the issues were patched before public disclosure.
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 · Jan 1, 2025 – Jun 25, 2026
  1. Jun 25, 20265mo ago

    Anthropic discloses Claude Code sandbox escape via Git worktree confusion

    A GitHub security advisory disclosed a Claude Code vulnerability in versions 2.1.38 through 2.1.162 where unsafe Git worktree handling enabled sandbox escape and unsandboxed code execution. The issue could let a malicious repository overwrite files such as .zshenv via symlink and fsmonitor abuse, and Anthropic reported it was fixed in later versions.

    Sandbox Escape via Git Worktree Path Confusion Allows Unsandboxed Code Execution · Advisory · anthropics/claude-code · GitHub
  2. Apr 6, 20268mo ago

    Anthropic fixes Claude Code deny-rule bypass in v2.1.90

    Anthropic addressed a high-severity Claude Code vulnerability that let attackers bypass developer-configured deny rules by hiding malicious payloads after the 50th subcommand in a long shell command. The flaw stemmed from a legacy regex-based parser in bashPermissions.ts that stopped detailed analysis after 50 entries and fell back to a generic permission prompt, creating a path to credential theft and supply-chain compromise.

    Critical Claude Code Vulnerability Silently Bypasses Developer-Configured Security Rules
  3. Feb 25, 20269mo ago

    Check Point publicly discloses three Claude Code vulnerabilities

    On February 25, 2026, Check Point Research publicly disclosed three Claude Code vulnerabilities that could let attackers achieve remote code execution and steal Anthropic API keys by luring developers into opening malicious repositories. The disclosure framed repository configuration files as a new AI software supply-chain attack surface.

  4. Feb 25, 20269mo ago

    Anthropic patches Claude Code trust and execution weaknesses

    Before public disclosure, Anthropic fixed the reported issues by tightening trust prompts, preventing Hooks and MCP execution before approval, and blocking network/API activity until a user explicitly trusts a repository. Advisories and CVEs were issued for at least two of the flaws, including CVE-2025-59536 and CVE-2026-21852.

  5. Jan 1, 20252y ago

    Check Point privately reports Claude Code flaws to Anthropic

    Check Point Research identified three vulnerabilities in Anthropic's Claude Code across 2025 and coordinated responsible disclosure with Anthropic. The flaws involved repository-controlled Hooks and MCP settings enabling code execution, plus configuration-based API key exfiltration.

Linked entities

Related entities

Vulnerabilities, threat actors, malware, products, organizations, breaches, and observables Mallory has linked to this story. Indicator values are masked here and available in full in the app.

Open in app →

Affected products

1 linked
Claude Code

Organizations

1 linked
Anthropic

Observables

2 linked

Indicator values are masked on this page. See the values in Mallory Domains, IPs, hashes, and URLs are exportable to your SIEM.

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.