CVE-2026-21852
published medium CVSS 4.0 · 5.3Claude Code Leaks Data via Malicious Environment Configuration Before Trust Confirmation
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| anthropics | — | claude-code< 2.0.65 | Affected | Not stated | GitHub_M |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
No linked advisories were found for this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 5.3 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- 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
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| anthropics | claude-code | < 2.0.65 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-522 CWE-522: Insufficiently Protected Credentials
References
1Provider assertions
2GitHub_M · cna
Claude Code Leaks Data via Malicious Environment Configuration Before Trust Confirmation
CISA-ADP · adp
CISA ADP Vulnrichment
Provenance
- Schema
- 5.2
- Searchable
- yes
- Content hash
- fc0038245e024c10269162c13b6e932d36fd25dfafbd3c90bbb208c12c65882e
- Ingested
- 23 Sep 2026, 09:05:14 UTC
- Source record
- Official CVE record