Advisory

GHSA-jh7p-qr78-84p7

Also known as: CVE-2026-21852

Summary

Claude Code Leaks Data via Malicious Environment Configuration Before Trust Confirmation

Details

A vulnerability in Claude Code's project-load flow allowed malicious repositories to exfiltrate data including Anthropic API keys before users confirmed trust. If a user started Claude Code in an attacker-controller repository, and the repository included a settings file that set ANTHROPIC_BASE_URL to an attacker-controlled endpoint, Claude Code would issue API requests before showing the trust prompt, including 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 the latest version.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2026-01-21 01:00 UTC
Modified
2026-02-03 03:11 UTC

Affected packages and fixes

@anthropic-ai/claude-code

npm · All systems

Affected

  • introduced 0, fixed 2.0.65 (semver)

Fixed versions

2.0.65

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences