Cyber Resilience

CVE-2026-21852

Exposed Creds in Anthropic Claude Code ≤ 2.0.65

Published
21 January 2026
Modified
02 February 2026
Patch / advisory
CVSS Score v4 5.3
Click a component to see what it means
Raw vectorCVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:P/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
EPSS Score 0.23 98th percentile
Risk Priority 60 floored blend · peak EPSS

Summary

CVE-2026-21852 is a medium-severity Insufficiently Protected Credentials (CWE-522) vulnerability in Anthropic Claude Code. Its CVSS base score is 5.3 (Medium).

Operationally, exploitation aligns with the MITRE ATT&CK technique Unsecured Credentials (T1552); ranked in the top 2% of CVEs by exploit likelihood; it is not currently listed in the CISA KEV catalog.

This vulnerability is AI-related — categorised as Enterprise AI Assistants; in the Supply Chain and Deployment risk domain.

The strongest mitigations our analysis identified map to SC-28 (Protection of Information at Rest) and SC-8 (Transmission Confidentiality and Integrity) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

CVE-2026-21852 is a vulnerability in Claude Code, an agentic coding tool developed by Anthropic, affecting versions prior to 2.0.65. The issue resides in the project's load flow, where malicious repositories can exfiltrate sensitive data, including users' Anthropic API keys, before a trust confirmation prompt is displayed. Specifically, an attacker-controlled repository can include a settings file that overrides the ANTHROPIC_BASE_URL environment variable to point to an attacker-controlled endpoint. Upon opening the repository, Claude Code reads this configuration and issues API requests immediately, bypassing user approval. The vulnerability is rated with a CVSS v3.1 base score of 7.5 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N) and is associated with CWE-522 (Insufficiently Protected Credentials).

Attackers can exploit this vulnerability remotely with no privileges or user interaction beyond convincing a target to open a malicious repository, such as via social engineering through shared links or recommendations. No authentication is required, making it accessible to any remote adversary. Successful exploitation allows the attacker to capture API requests containing the victim's Anthropic API keys, enabling unauthorized access to the victim's Anthropic services, potential further compromise of associated accounts, and exfiltration of additional data processed through those APIs.

The security advisory at https://github.com/anthropics/claude-code/security/advisories/GHSA-jh7p-qr78-84p7 recommends updating to version 2.0.65 or later, which includes a patch addressing the configuration override issue. Users on the standard auto-update channel have already received the fix, while those using manual updates must apply it explicitly to mitigate the risk.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

AI Security AnalysisAI

AI Category
Enterprise AI Assistants
Risk Domain
Supply Chain and Deployment
OWASP Top 10 for LLMs 2025
None mapped
Classification Reason
Matched keywords: anthropic, claude

Related Threats

MITRE ATT&CK Enterprise Techniques

T1552 Unsecured Credentials Credential Access
Adversaries may search compromised systems to find and obtain insecurely stored credentials.
T1552.001 Credentials In Files Credential Access
Adversaries may search local file systems and remote file shares for files containing insecurely stored credentials.
T1021 Remote Services Lateral Movement
Adversaries may use [Valid Accounts](https://attack.
T1078 Valid Accounts Stealth
Adversaries may obtain and abuse credentials of existing accounts as a means of gaining Initial Access, Persistence, Privilege Escalation, or Defense Evasion.
T1114.002 Remote Email Collection Collection
Adversaries may target an Exchange server, Office 365, or Google Workspace to collect sensitive information.
T1550.003 Pass the Ticket Lateral Movement
Adversaries may “pass the ticket” using stolen Kerberos tickets to move laterally within an environment, bypassing normal system access controls.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-25725Same product: Anthropic Claude Code
CVE-2026-25723Same product: Anthropic Claude Code
CVE-2026-24052Same product: Anthropic Claude Code
CVE-2025-59041Same product: Anthropic Claude Code
CVE-2025-59536Same product: Anthropic Claude Code
CVE-2025-66032Same product: Anthropic Claude Code
CVE-2025-64755Same product: Anthropic Claude Code
CVE-2025-65099Same product: Anthropic Claude Code
CVE-2026-25724Same product: Anthropic Claude Code
CVE-2026-24887Same product: Anthropic Claude Code

Affected Assets

anthropic
claude code
≤ 2.0.65

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)
  • 1 hardening rule · 1 OS baseline
Validate
Prove the fix (OWASP ASVS)
  • V11.3.3

Mitigating Controls (NIST 800-53 r5) AI

Protection of information at rest requires encryption or equivalent safeguards for stored credentials.

Transmission confidentiality and integrity enforcement stops credentials from being sent in plaintext or without protection.

Authenticator management requires secure generation, storage, and distribution of credentials, directly stopping insecure methods.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.DS-01 full match
prevents

Encrypting data-at-rest fully prevents insecure credential storage while only partially satisfying the broader data-protection outcome.

PR.DS-02 full match
prevents

Encrypting data-in-transit fully prevents interception of credentials in motion while only partially satisfying the broader data-protection outcome.

PR.AA-01 mostly match
prevents

Credential management practices directly reduce insecure storage/transmission but do not guarantee encryption or transport protection.

PR.AA-04 mostly match
prevents

Protecting identity assertions covers conveyance of credentials but is narrower than full credential lifecycle protection.

PR.AA-03 partial match
prevents

Authentication policies can enforce stronger credential handling yet address only verification, not storage or transit protection.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

prevents

Requiring protected storage, transmission, and non-display of passwords prevents credentials from being stored or sent in clear text where they can be harvested by unauthorized actors.

prevents

Protecting secret and private keys against disclosure and unauthorized use decreases the exposure of credentials that are stored or transmitted in recoverable form.

prevents

Forbidding clear-text transmission and display of passwords, plus the use of stronger alternatives to passwords, prevents credentials from being obtained or reused by attackers.

prevents

Acceptable-use expectations that cover protection of credentials and information assets throughout their lifecycle discourage practices that expose or mishandle authentication material.

prevents

Contractual clauses that survive termination help ensure that credentials and other secrets are not retained or misused after employment ends.

prevents

Regular reminders about password security and personal accountability make users less likely to store or transmit credentials in cleartext or other unprotected forms.

References