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

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.


