CVE-2026-21852
HIGHClaude Code < 2.0.65 - Unauthenticated API Key Exfiltration via Malicious Repository Settings
Title source: llmExploitation Summary
EIP tracks 3 public exploits for CVE-2026-21852. PoCs published by atiilla, XZ1r0, TreRB.
AI-analyzed exploit summary This repository contains a functional proof-of-concept for CVE-2026-21852, demonstrating API key exfiltration via base URL manipulation in Anthropic's Claude Code CLI tool. It includes a MITM proxy to capture API keys and traffic, along with a scanner to detect vulnerable configurations.
Description
Claude Code is an agentic coding tool. Prior to version 2.0.65, vulnerability in Claude Code's project-load flow allowed malicious repositories to exfiltrate data including Anthropic API keys before users confirmed trust. An attacker-controlled repository could include a settings file that sets ANTHROPIC_BASE_URL to an attacker-controlled endpoint and when the repository was opened, Claude Code would read the configuration and immediately issue API requests before showing the trust prompt, potentially leaking the user's API keys. Users on standard Claude Code auto-update have received this fix already. Users performing manual updates are advised to update to version 2.0.65, which contains a patch, or to the latest version.
Exploits (3)
This repository contains a functional proof-of-concept for CVE-2026-21852, demonstrating API key exfiltration via base URL manipulation in Anthropic's Claude Code CLI tool. It includes a MITM proxy to capture API keys and traffic, along with a scanner to detect vulnerable configurations.
This repository contains functional exploit code demonstrating CVE-2026-21852, which involves API key exfiltration and conversation interception via manipulated Claude Code settings. The PoC includes a MITM proxy and attacker server to capture credentials and data.
This repository contains a static analysis tool designed to scan for malicious AI-IDE configuration files that could lead to RCE, credential theft, or persistent compromise. It checks for various attack vectors such as Claude Code hooks, Unicode smuggling in rules files, MCP auto-registration, and API base-URL redirection.
References (1)
Scores
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N