Read the docs
TI-2026-17554 Aliases CVE-2026-21852GHSA-jh7p-qr78-84p7

Claude Code Leaks Data via Malicious Environment Configuration Before Trust Confirmation

Priority MEDIUM 52CWE-522Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Passive
Attack complexity
Low
Attack requirements
None
Impact type
Information disclosure
Confidentiality · integrity · availability
Low · Low · Low
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-522.

Summary

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.

Why it matters now

Exploitation None reported CISA SSVC · not in CISA KEV
EPSS 0.27504 98th percentileScored 2026-11-07
Fix Fixed claude-code (anthropics): 2.0.65@anthropic-ai/claude-code (npm): 2.0.65

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
None
Automatable
Yes
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
anthropicsclaude-codebefore 2.0.652.0.65Patch availableCNA
—@anthropic-ai/claude-code (npm)before 2.0.652.0.65Patch availableGHSA-jh7p-qr78-84p7
  • claude-code Vendoranthropics Affected before 2.0.65 Fixed in 2.0.65 Patch available CNA
  • @anthropic-ai/claude-code (npm) Vendor— Affected before 2.0.65 Fixed in 2.0.65 Patch available GHSA-jh7p-qr78-84p7

CPE configurations NVD · 1

CPEVersionsRoleVendor
cpe:2.3:a:anthropic:claude_code:*:*:*:*:*:node.js:*:*before 2.0.65Vulnerableanthropics
  • cpe:2.3:a:anthropic:claude_code:*:*:*:*:*:node.js:*:* Versions before 2.0.65 Vulnerable ·anthropics

Remediation

  • Fix · CNA claude-code (anthropics) Fixed in 2.0.65
  • Fix · GHSA-jh7p-qr78-84p7 @anthropic-ai/claude-code (npm) Fixed in 2.0.65 Advisory →

Timeline

  1. 2026-10-02 Threatist record created from CVE-2026-21852
  2. 2026-10-03 Alias added: GHSA-jh7p-qr78-84p7

References

  • TI-2025-40558 Claude Code Command Validation Bypass Allows Arbitrary Code Execution CVSS 4.0HIGH 8.7
  • TI-2025-36683 Claude Code vulnerable to arbitrary code execution caused by maliciously configured git email CVSS 4.0HIGH 8.7
  • TI-2025-37066 Claude Code's startup trust dialog could lead to Command Execution attack CVSS 4.0HIGH 8.7
  • TI-2025-40093 @anthropic-ai/claude-code has Sed Command Validation Bypass that Allows Arbitrary File Writes CVSS 4.0HIGH 8.7
  • TI-2025-36422 Claude Code rg command had Command Injection that allowed bypass of user approval prompt for command execution CVSS 4.0HIGH 8.7
  • TI-2025-34550 Claude Code echo command allowed bypass of user approval prompt for command execution CVSS 4.0HIGH 8.7
See all 25 →

Sources