5.3medium
Claude Code Leaks Data via Malicious Environment Configuration Before Trust Confirmation
- Severity
- 5.3medium CVSS:4.0 by GitHub_M
- Exploit likelihood
- 27.5% (higher than 98% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-jh7p-qr78-84p7
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
| Product or package | Versions | Reported by |
|---|---|---|
| anthropics claude-code | < 2.0.65 | CVE List |
| @anthropic-ai/claude-code (npm) | before 2.0.65 | GitHub Advisory Database |
| anthropic claude_code | before 2.0.65 | NVD |
All scores
| GitHub_M | 5.3medium CVSS:4.0 | 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 |
| GitHub | medium CVSS:4.0 | 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 |
| NVD | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N |
Classification
SSVC (CISA-ADP): exploitation none, automatable yes, technical impact partial.
What each source says
CVE List
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.
GitHub Advisory Database
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.
NVD (es)
Claude Code es una herramienta de codificación agéntica. Antes de la versión 2.0.65, una vulnerabilidad en el flujo de carga de proyectos de Claude Code permitía a repositorios maliciosos exfiltrar datos, incluyendo claves API de Anthropic, antes de que los usuarios confirmaran la confianza. Un repositorio controlado por un atacante podría incluir un archivo de configuración que estableciera ANTHROPIC_BASE_URL a un punto final controlado por un atacante y, cuando se abría el repositorio, Claude Code leería la configuración e inmediatamente emitiría solicitudes API antes de mostrar la solicitud de confianza, filtrando potencialmente las claves API del usuario. Los usuarios con la actualización automática estándar de Claude Code ya han recibido esta corrección. Se aconseja a los usuarios que realizan actualizaciones manuales que actualicen a la versión 2.0.65, que contiene un parche, o a la última versión.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-21852 changed 2026-01-21 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-jh7p-qr78-84p7 changed 2026-02-03 | CC-BY-4.0 |
| NVD | CVE-2026-21852 changed 2026-06-17 | Public domain |