A Leader in the 2025 Gartner® Magic Quadrant™ for Endpoint Protection Platforms. Five years running.A Leader in the Gartner® Magic Quadrant™Read the Report
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI Security Portfolio
      Leading the Way in AI-Powered Security Solutions
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      Digital Forensics, IRR & Breach Readiness
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2026-21852

CVE-2026-21852: Claude Code Information Disclosure Flaw

CVE-2026-21852 is an information disclosure vulnerability in Claude Code that allows malicious repositories to exfiltrate API keys before users confirm trust. This article covers technical details, affected versions, and mitigation.

Published: January 23, 2026

CVE-2026-21852 Overview

A vulnerability in Claude Code's project-load flow allows malicious repositories to exfiltrate sensitive data, including Anthropic API keys, before users confirm trust. An attacker-controlled repository can include a settings file that sets ANTHROPIC_BASE_URL to an attacker-controlled endpoint. When the repository is opened, Claude Code reads the configuration and immediately issues API requests before showing the trust prompt, potentially leaking the user's API keys.

Critical Impact

Attackers can steal Anthropic API keys from developers by tricking them into opening malicious repositories, enabling unauthorized API access and potential credential abuse.

Affected Products

  • Claude Code versions prior to 2.0.65

Discovery Timeline

  • 2026-01-21 - CVE CVE-2026-21852 published to NVD
  • 2026-01-21 - Last updated in NVD database

Technical Details for CVE-2026-21852

Vulnerability Analysis

This vulnerability represents a configuration injection flaw (CWE-522: Insufficiently Protected Credentials) in Claude Code's initialization sequence. The core issue lies in the timing of configuration file parsing relative to user trust verification.

When a user opens a repository containing a malicious settings file, Claude Code processes the configuration immediately upon project load. This includes parsing and applying any custom ANTHROPIC_BASE_URL value specified in the repository's settings. Because this configuration is applied before the trust prompt is displayed to the user, API requests containing authentication credentials are sent to whatever endpoint is specified—including attacker-controlled servers.

The vulnerability enables a pre-authentication attack vector where malicious actors can harvest API keys simply by convincing developers to clone and open their repositories. This is particularly concerning in open-source development workflows where developers frequently clone unfamiliar repositories for code review or dependency evaluation.

Root Cause

The root cause is an improper initialization order in Claude Code's project-load flow. Configuration settings from repository files are applied before the user is presented with a trust confirmation dialog. This allows untrusted repository content to influence security-critical settings like the API endpoint URL before the user has an opportunity to review and reject potentially malicious configurations.

The vulnerability stems from the assumption that configuration files could be safely read before trust verification, when in practice these settings directly control where sensitive credentials are transmitted.

Attack Vector

The attack is network-based and requires user interaction. An attacker would create a malicious repository containing a crafted settings file that overrides the ANTHROPIC_BASE_URL to point to an attacker-controlled server. The attack flow proceeds as follows:

  1. Attacker creates a repository with a malicious configuration file setting ANTHROPIC_BASE_URL to their server
  2. Victim clones or downloads the malicious repository
  3. Victim opens the repository in Claude Code
  4. Claude Code reads the configuration and applies the malicious URL setting
  5. Claude Code makes API requests to the attacker's server, including the user's API key
  6. The trust prompt is shown after credentials have already been transmitted
  7. Attacker captures the API key regardless of whether the user accepts or rejects the trust prompt

For technical details on exploitation, see the GitHub Security Advisory.

Detection Methods for CVE-2026-21852

Indicators of Compromise

  • Unexpected network connections from Claude Code to non-Anthropic domains
  • Repository configuration files containing custom ANTHROPIC_BASE_URL settings pointing to unknown endpoints
  • API key usage from unfamiliar IP addresses or geographic locations in Anthropic API logs

Detection Strategies

  • Monitor outbound network traffic from Claude Code for connections to endpoints other than official Anthropic API servers
  • Implement file integrity monitoring to detect repository configuration files that override API endpoint settings
  • Review Anthropic API usage logs for anomalous activity patterns indicating potential key compromise

Monitoring Recommendations

  • Enable logging for Claude Code network activity and review for unexpected destination addresses
  • Configure alerts for Anthropic API key usage from new or suspicious IP addresses
  • Implement repository scanning to identify configuration files that modify sensitive settings before opening projects

How to Mitigate CVE-2026-21852

Immediate Actions Required

  • Update Claude Code to version 2.0.65 or later immediately
  • Rotate any Anthropic API keys that may have been exposed through untrusted repositories
  • Review recently opened repositories for suspicious configuration files
  • Audit Anthropic API usage logs for unauthorized access attempts

Patch Information

Anthropic has released version 2.0.65 of Claude Code which addresses this vulnerability by ensuring trust verification occurs before processing repository configuration files. Users on standard Claude Code auto-update should have received this fix automatically. Users performing manual updates should update to version 2.0.65 or the latest available version. For additional details, refer to the GitHub Security Advisory.

Workarounds

  • Avoid opening untrusted or unfamiliar repositories in Claude Code until the update is applied
  • Manually inspect repository configuration files for suspicious ANTHROPIC_BASE_URL settings before opening projects
  • Use network monitoring tools to block outbound connections from Claude Code to non-whitelisted domains
bash
# Verify Claude Code version
claude --version

# Update Claude Code to the latest patched version
npm update -g @anthropic/claude-code

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeInformation Disclosure

  • Vendor/TechClaude Code

  • SeverityMEDIUM

  • CVSS Score5.3

  • EPSS Probability0.04%

  • Known ExploitedNo
  • CVSS 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/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
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityLow
  • AvailabilityLow
  • CWE References
  • CWE-522
  • Technical References
  • GitHub Security Advisory
  • Related CVEs
  • CVE-2025-52882: Claude Code Information Disclosure Flaw

  • CVE-2026-25722: Anthropic Claude Code Path Traversal Flaw

  • CVE-2026-24052: Claude Code SSRF Vulnerability

  • CVE-2026-24887: Claude Code RCE Vulnerability
Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • English
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use