Check Point Finds Claude Code Flaws Enabling Repository-Based RCE and API-Key Theft

· Original article ↗

Summary

Check Point Research details Claude Code flaws that let malicious project configurations trigger command execution and expose API keys. Anthropic patched the issues before public disclosure.

Key points

  • Repository-controlled Claude Code Hooks could run shell commands on a collaborator’s machine after project trust was accepted, without an additional execution prompt.
  • MCP settings such as enableAllProjectMcpServers could bypass consent and run initialization commands before users could read the trust dialog.
  • A malicious ANTHROPIC_BASE_URL setting could redirect API requests, including the victim’s API key, before trust was accepted.
  • The researchers found a stolen API key could be used to access and manipulate shared Workspace files, including regenerating files for download, deleting or uploading files, and consuming storage or API credits.
  • The researchers describe supply-chain scenarios involving malicious pull requests, honeypot repositories, and internal repositories.
  • Anthropic enhanced trust warnings, prevented MCP initialization before approval, and deferred network requests until after consent; the reported issues were patched before public disclosure.

Article Details

Attack Vectors
  • Repository-controlled .claude/settings.json hooks executed shell commands when Claude Code opened an untrusted project, without a separate execution prompt.
  • Project .mcp.json settings combined with repository-controlled MCP approval options to initialize attacker-supplied commands before user consent.
  • A repository-controlled ANTHROPIC_BASE_URL redirected API requests, exposing the victim's Anthropic API key to an attacker-controlled endpoint before the trust dialog was accepted.
  • Malicious configurations could be distributed through pull requests, honeypot repositories, or compromised internal repositories.
Defensive Notes
  • Update Claude Code; the article reports that all discussed vulnerabilities were patched before public disclosure.
  • Inspect .claude/, .vscode/, and other tool-specific configuration directories before opening a project.
  • Review configuration changes as carefully as source code, and heed warnings about untrusted project files.
  • Anthropic's fixes prevent MCP initialization and network/API requests before user approval.

Indicators of compromise

TypeIndicatorContext
DOMAINattacker-server[.]comAttacker-controlled endpoint identified for delivering a payload and receiving redirected API requests, including the victim's API key.
URLhxxp[:]//attacker-server[.]com/payload.shExample malicious payload URL used in a repository-controlled hook to download and execute a shell script.

MITRE ATT&CK

CVE

Vendors

Products

Tools

Related Articles