CVE-2026-21852
highpriority · attend · 50EPSS 0.275 · 98 %ileexploit · PoCEUUSEPSS · scored 2026-10-27
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.
cvss
Technical severity, 0–10. One row per scoring source.
base score 0–10 · higher = more severe · hover a vector to decode⚠ sources disagree · low–high · 2.1–7.5
ssvc
A stakeholder decision — act, attend, or track — from exploitation and impact.
weaknesses
The CWE weakness classes this flaw belongs to.
exploits (4)
Public proof-of-concept and weaponised exploit code.
- atiilla/CVE-2026-21852-PoCatiilla/CVE-2026-21852-PoCPoC · poc_in_github
affected products (3)
Products and version ranges known to be affected.
advisories (1)
Vendor and ecosystem advisories describing this.
- GHSA-jh7p-qr78-84p7Claude Code Leaks Data via Malicious Environment Configuration Before Trust Confirmation2026-01-21ghsa · osvUS
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. Users on standard Claude Code auto-update have received this fix already. Users performing manual updates are advised to update to the latest version.
also known as (3)
Other names and identifiers for this entity.
sources
Which sources assert this record, and when.
references (5)
External citations — patches, advisories, analysis.
- https://access.redhat.com/security/cve/cve-2026-21852cnnvd
- https://github.com/anthropics/claude-code/releasesPatchcnnvd
- https://github.com/anthropics/claude-code/security/advisories/GHSA-jh7p-qr78-84p7cnnvd
- https://github.com/anthropics/claude-code/security/advisories/GHSA-jh7p-qr78-84p7enisa_euvd
- https://github.com/anthropics/claude-code/security/advisories/GHSA-jh7p-qr78-84p7Vendor Advisorynvd
Attackers weaponise vulnerabilities like this against internet-exposed services. See what is exposed on your perimeter with a free passive scan.
Free scan