{"id":"CVE-2026-21852","published":"2026-01-21T20:42:06Z","modified":"2026-01-21T21:34:43Z","title":"Claude Code Leaks Data via Malicious Environment Configuration Before Trust Confirmation","vendor":"anthropics","product":"claude-code","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":5.3,"severity":"MEDIUM","version":"4.0","vector":"CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.27504,"percentile":0.98116,"provenance":"source"},"cwes":[{"id":"CWE-522","name":"Insufficiently Protected Credentials"}],"references":[{"url":"https://github.com/anthropics/claude-code/security/advisories/GHSA-jh7p-qr78-84p7","tags":["x_refsource_CONFIRM"]}],"priority":{"score":28.3,"factors":[{"name":"EPSS percentile","points":19.62},{"name":"Public exploit code","points":5.0},{"name":"CVSS severity","points":3.71}]},"exploitSources":{"pocGithub":{"count":4,"skipped":0,"earliest":"2026-02-27","earliestUrl":"https://github.com/atiilla/CVE-2026-21852-PoC","repos":[{"name":"atiilla/CVE-2026-21852-PoC","url":"https://github.com/atiilla/CVE-2026-21852-PoC","stars":24,"created":"2026-02-27"},{"name":"TreRB/ai-ide-config-guard","url":"https://github.com/TreRB/ai-ide-config-guard","stars":0,"created":"2026-04-20"},{"name":"Perufitlife/dotclaude-security","url":"https://github.com/Perufitlife/dotclaude-security","stars":0,"created":"2026-06-21"},{"name":"abhishek2512mishra/claude-code-security-audit","url":"https://github.com/abhishek2512mishra/claude-code-security-audit","stars":0,"created":"2026-09-13"}]},"first":{"date":"2026-02-27","source":"PoC-in-GitHub","url":"https://github.com/atiilla/CVE-2026-21852-PoC"},"provenance":"source"},"vendorSlug":"anthropics","affectedVersions":[{"vendor":"anthropics","product":"claude-code","versions":["< 2.0.65"]}],"ssvc":{"exploitation":"none","automatable":"yes","technicalImpact":"partial","timestamp":"2026-01-21T21:34:19.798222Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"@anthropic-ai/claude-code","vulnerableRanges":["<2.0.65"],"patched":["2.0.65"],"from":["GHSA-jh7p-qr78-84p7"],"provenance":"source"}],"summary":{"text":"Claude Code, Anthropic's agentic coding tool, contains a flaw in its project-load flow, prior to version 2.0.65, where it reads repository configuration before the user has confirmed trust. An attacker can supply a malicious repository whose settings file points ANTHROPIC_BASE_URL at an attacker-controlled endpoint, so that opening the repository causes Claude Code to send API requests, and potentially the user's Anthropic API keys, to that endpoint before the trust prompt appears, requiring only that the victim open the repository over the network with no authentication needed.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T06:41:17Z"},"euvd":{"id":"EUVD-2026-3597","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2025-64755","published":"2025-11-21","fixed":"2.0.31","kev":false},{"cve":"CVE-2026-25723","published":"2026-02-06","fixed":"2.0.55","kev":false},{"cve":"CVE-2026-25722","published":"2026-02-06","fixed":"2.0.57","kev":false},{"cve":"CVE-2026-21852","published":"2026-01-21","fixed":"2.0.65","kev":false},{"cve":"CVE-2026-24887","published":"2026-02-03","fixed":"2.0.72","kev":false,"link":{"from":"CVE-2026-21852","to":"CVE-2026-24887","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"npm:@anthropic-ai/claude-code","fromFixed":"2.0.65","toFixed":"2.0.72","daysApart":13}]}},{"cve":"CVE-2026-24053","published":"2026-02-03","fixed":"2.0.74","kev":false},{"cve":"CVE-2026-25725","published":"2026-02-06","fixed":"2.1.2","kev":false}],"package":"npm:@anthropic-ai/claude-code"}}