CVE-2026-21852
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.
Description as published by the source, in English.
Key facts
- Published
- 2026-01-21
- Last modified
- 2026-06-17
- Assigned by
- security-advisories@github.com
- CVSS vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N- Scored by
- nvd@nist.gov (NVD Primary)
- Probability of exploitation
-
23.2 %
higher than 98 %
of all known vulnerabilities
EPSS, next 30 days, model v2026.06.15 - Fix available
- Not registered in the sources
Affected products
| Vendor | Product | Versions | Status |
|---|---|---|---|
| Anthropic | Claude Code | < 2.0.65 | Affected |
| anthropic-ai | claude-code (npm) | < 2.0.65 | Affected |
Weakness type
-
CWE-522: Insufficiently Protected Credentials
The product transmits or stores authentication credentials, but it uses an insecure method that is susceptible to unauthorized interception and/or retrieval.
Attack techniques
Derived through the weakness type: CVE to CWE to CAPEC to ATT&CK. This shows which techniques the weakness class is historically used for. It does not assert that this vulnerability has been exploited that way.
- T1021: Remote Services
- T1021.002: SMB/Windows Admin Shares
- T1078: Valid Accounts
- T1110.004: Credential Stuffing
- T1114.002: Remote Email Collection
- T1133: External Remote Services
- T1543: Create or Modify System Process
- T1550.002: Pass the Hash
- T1550.003: Pass the Ticket
- T1552.004: Private Keys
- T1558: Steal or Forge Kerberos Tickets
- T1558.003: Kerberoasting
References
Related at Berigo
Articles
-
A language model found an attack that forces HAWK to double its keys
Same product
2026-08-24
On 28 July 2026 Anthropic published two cryptanalytic results found with a language model. Neither has practical significance for systems in operatio…
-
New numbers show how often an attacker succeeds against an AI agent
Same product
2026-08-18
The system card for Claude Opus 5 does not measure how many attacks succeed, but the probability that an attacker finds at least one working attack w…
-
Shared Claude conversations turned up in Google search
Same product
2026-08-18
On 27 July 2026 404 Media reported that shared Claude conversations and artifacts appeared in Google search results. The findings included medical re…
-
Meta says one of its models broke into another company during testing
Same product
2026-08-13
Meta says one of its models unexpectedly gained internet access during a security evaluation, and that the model then exploited a vulnerability in a …
Does this affect you?
A vulnerability matters only if you run the product, in an affected version, somewhere an attacker can reach.