CVE-2026-21852

Claude Code Leaks Data via Malicious Environment Configuration Before Trust Confirmation

HIGH
7.5
CVSS Score
Published: January 21, 2026 at 08:42 PM UTC
Updated: June 17, 2026 at 10:19 AM UTC
2 products affected across 2 vendorsClaude CodeClaude Code

Using claude-code by anthropics?

Get instant alerts when new vulnerabilities affect claude-code - before attackers find them.

Real-time alertsTrack your software stackFree plan available
Severity
HIGH7.5
Exploit prediction
EPSS 28%
SSVC
No known exploit

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.

Affected

Our own answer: ranges merged, affected separated from platform-only, with confidence and review flags.

v < 2.0.65

Fix versions

  • Outside the affected range from 2.0.65
    Our inference from the affected range (< 2.0.65)
v < 2.0.65

Fix versions

  • Outside the affected range from 2.0.65
    Our inference from the affected range (< 2.0.65)

Remediation

No guide yet

No remediation guidance has been written for this CVE yet. What the record does show:

References (1)

SSVC — Action Prioritization

SSVCNo known exploitAutomatablePartial impact

SSVC signals action urgency (what to patch first), separate from CVSS which measures severity.

CVSS

Attack Vector
NETWORK
Complexity
LOW
Privileges
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
NONE
Availability
NONE
Vector?

Quick Info

StatusANALYZED
CWE
CWE-522

Get alerted

Stop reading CVE feeds looking for your own stack

Track the products you run and VulnTracker tells you when a new CVE affects them — with what is known about fixing it, and nothing about the rest.

Free plan, no card

This product uses data from the NVD API but is not endorsed or certified by the NVD. CVE records are from the CVE Program (CVE.org).