Anthropic Claude Code < 2.0.65 API Key Leak via Project Settings (CVE-2026-21852)

medium Nessus Plugin ID 305985

Synopsis

An application installed on the remote host is affected by an information disclosure vulnerability.

Description

The version of Anthropic Claude Code installed on the remote host is prior to 2.0.65. It is, therefore, affected by an information disclosure vulnerability.

A vulnerability in the 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-controlled 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, potentially leaking the user's API keys. (CVE-2026-21852)

Note that Nessus has not tested for this issue but has instead relied only on the application's self-reported version number.

Solution

Upgrade Anthropic Claude Code to version 2.0.65 or later.

See Also

http://www.nessus.org/u?7b2164da

Plugin Details

Severity: Medium

ID: 305985

File Name: anthropic_claude_code_CVE-2026-21852.nasl

Version: 1.1

Type: Local

Agent: unix

Family: Misc.

Published: 4/10/2026

Updated: 4/10/2026

Supported Sensors: Nessus Agent, Nessus

Risk Information

VPR

Risk Factor: Medium

Score: 6.1

CVSS v2

Risk Factor: Medium

Base Score: 6.4

Vector: CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:N

CVSS Score Source: CVE-2026-21852

CVSS v3

Risk Factor: Medium

Base Score: 6.3

Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:L/I:L/A:L

Vulnerability Information

CPE: cpe:/a:anthropic:claude_code

Required KB Items: installed_sw/Anthropic Claude Code

Patch Publication Date: 1/20/2026

Vulnerability Publication Date: 1/20/2026

Reference Information

CVE: CVE-2026-21852

IAVA: 2026-A-0304