CVE-2026-21852CWE-522

Claude Code Leaks Data via Malicious Environment Configuration Before Trust Confirmation

Medium · published January 21, 2026

CVSS v4.0
5.3
EPSS
28%
Percentile
98.1
In the wild
Unconfirmed
What it is

⚠️ A sneaky configuration flaw could let attackers snatch your Anthropic API keys right under your nose! 🎭 Think of it like a waiter mistakenly bringing out the wrong dish—your sensitive data is served to an attacker before you even get a chance to specify what you want! 🍽️ An attacker controlling a malicious repository might snatch sensitive data, including your precious API keys, before you even confirm the trust in their repository. This means they could manipulate your API calls, leading to unintended data leaks or even unauthorized actions on your behalf.

Put simply

Think of it like a waiter mistakenly bringing out the wrong dish—your sensitive data is served to an attacker before you even get a chance to specify what you want! 🍽️ This vulnerability allows an attacker to exfiltrate user's API keys by hosting a malicious settings file in a repository that Claude Code reads before the user confirms trust. The tool makes API requests to the attacker's endpoint immediately after loading the project without waiting for user approval.

What to do

An attacker controlling a malicious repository might snatch sensitive data, including your precious API keys, before you even confirm the trust in their repository. This means they could manipulate your API calls, leading to unintended data leaks or even unauthorized actions on your behalf. If you're using Claude Code and haven't auto-updated, make sure to upgrade to version 2.0.65 or the latest release. This patch ensures your API keys and configurations are safe from unwanted attention. Don't forget to check your repository configurations to avoid future mishaps! You've got this! Stay secure and keep those keys safe! 🛡️

The record
Technical detail
CVSS v4.0
5.3 · MEDIUM
Vector
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
EPSS
0.27504 · 98.1th percentile
Weakness
CWE-522 · Insufficiently Protected Credentials
Published
2026-01-21T20:42Z
EPSS history
Timeline
  • 21 JAN 20:42Z
    Claude Code Leaks Data via Malicious Environment Configuration Before Trust Confirmation
    cvelistv5