{"id":"GHSA-jh7p-qr78-84p7","summary":"Claude Code Leaks Data via Malicious Environment Configuration Before Trust Confirmation","details":"A vulnerability in Claude Code's project-load flow allowed malicious repositories to exfiltrate data including Anthropic API keys before users confirmed trust. If a user started Claude Code in an attacker-controller repository, and the repository included a settings file that set ANTHROPIC_BASE_URL to an attacker-controlled endpoint, Claude Code would issue API requests before showing the trust prompt, including potentially leaking the user's API keys.\n\nUsers on standard Claude Code auto-update have received this fix already. Users performing manual updates are advised to update to the latest version.","aliases":["CVE-2026-21852"],"modified":"2026-02-03T03:11:19.470547Z","published":"2026-01-21T01:00:31Z","database_specific":{"severity":"MODERATE","github_reviewed":true,"github_reviewed_at":"2026-01-21T01:00:31Z","nvd_published_at":"2026-01-21T21:16:08Z","cwe_ids":["CWE-522"]},"references":[{"type":"WEB","url":"https://github.com/anthropics/claude-code/security/advisories/GHSA-jh7p-qr78-84p7"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-21852"},{"type":"PACKAGE","url":"https://github.com/anthropics/claude-code"}],"affected":[{"package":{"name":"@anthropic-ai/claude-code","ecosystem":"npm","purl":"pkg:npm/%40anthropic-ai/claude-code"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.0.65"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/01/GHSA-jh7p-qr78-84p7/GHSA-jh7p-qr78-84p7.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V4","score":"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"}]}