CVE-2026-21852: anthropics claude-code · Insufficiently Protected Credentials
Affects anthropics claude-codeSource CVE Database V5
Not known to be exploited · 27% EPSS · CVSS 5.3 Medium : upgrade to 2.0.65 when convenient.
Data as of 26 Oct 2026, 10:12 UTC
- EPSS
- 27.5% chance of exploitation in 30 days – higher than 98% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
- Patch
- Available – fixed in 2.0.65
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:NExploitation evidence
Disclosed: evidence found.
CVE published 21 Jan 2026
Detectable: no evidence on record.
No public nuclei template indexed
Weaponised: no evidence on record.
No public exploit code indexed in Metasploit or Exploit-DB
Exploited in the wildExploited: no evidence on record.
Not in CISA KEV and no source reports exploitation
Observed by OffSeq MirageSeen by Mirage: no evidence on record.
No attack traffic recorded by OffSeq Mirage sensors
A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.
What to do
Upgrade claude-code and anthropics/claude-code to 2.0.65.
Affected software
| Product | Affected | Fixed in |
|---|---|---|
| anthropicsclaude-code | Affected
| Fixed in
|
GitHubanthropics/claude-codepkg:github/anthropics/claude-codeOther threats | Affected
| Fixed in
|
Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.
AI-suggested
European organizations should ensure all instances of Claude Code are updated to version 2.0.65 or later, especially those updated manually. Implement strict policies to restrict opening repositories from untrusted or unknown sources. Employ network monitoring to detect unusual outbound API requests from developer workstations. Use environment variable protections or secrets management solutions to prevent leakage of API keys through configuration files. Educate developers about the risks of opening untrusted repositories and the importance of verifying repository trust prompts. Consider isolating development environments or using sandboxing techniques to limit the impact of potential credential exfiltration. Audit and rotate Anthropic API keys regularly to minimize exposure duration. Finally, monitor for any suspicious activity on Anthropic API usage that could indicate compromised credentials.
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.