Incident report

Agentic Coding CLI Project-Level API Base URL Override Exfiltrating API Keys

CVE-2026-21852 (published January 21, 2026, disclosed by Check Point Research) revealed an API-key exfiltration vector in Claude Code caused by honoring project-level configuration overrides for outbound API endpoints (`ANTHROPIC_BASE_URL` or equivalent project settings). If a developer opened a maliciously crafted repository containing an attacker-specified API endpoint URL, outbound inference requests could transmit the developer's authenticated API key and workspace context to an adversary-controlled server before confirmation. Anthropic restricted sensitive endpoint-override settings so untrusted project configs cannot redirect authenticated API credentials.

Incident record

Reported
Severity
High
Vector
Data Exfiltration
Affected system type
Terminal Agentic Coding CLIs
Reference
CVE-2026-21852
Reference URI
https://nvd.nist.gov/vuln/detail/CVE-2026-21852

Inspect in Interactive Incidents Hub

Defensive lesson

Never allow repository-level configuration files to override outbound API base URLs, proxy settings, or authentication destinations.

Referenced techniques