Join our Experts on June 24 as they explain how to Detect, Divert, and Deceive AI-Assisted Threats

CVE-2026-35022

Breaking Down CVE-2026-35022: Command Injection Risk in Claude Code CLI & SDK

CVSS Gauge
CVSS Needle

Summary

CVE-2026-35022 is a critical OS command injection vulnerability in Anthropic Claude Code CLI and Claude Agent SDK, caused by the execution of authentication helper configurations with shell interpretation and no input validation. Attackers who can influence these settings can inject commands via parameters like apiKeyHelper and cloud credential helpers, leading to arbitrary command execution, credential theft, and data exfiltration, particularly in CI/CD environments where such configurations may be externally controlled.

Urgent Actions Required

Which Systems Are Vulnerable to CVE-2026-35022?

Technical Overview

How Does the CVE-2026-35022 Exploit Work?

The attack typically follows these steps:

CVE-2026-35022

What Causes CVE-2026-35022?

Vulnerability Root Cause:

This issue arises from the unsafe handling of authentication helper configurations in Claude Code CLI and Agent SDK. The application executes helper parameters such as apiKeyHelper, awsAuthRefresh, awsCredentialExport, and gcpAuthRefresh using shell=true without validating input. Attackers can inject shell characters into configs, enabling command execution with user privileges, leading to credential theft and environment variable exposure.

How Can You Mitigate CVE-2026-35022?

If immediate patching is delayed or not possible:

  • Stop using authentication helper configurations such as apiKeyHelper, awsAuthRefresh, awsCredentialExport, and gcpAuthRefresh.
  • Set the ANTHROPIC_API_KEY directly as an environment variable instead of relying on helper execution.
  • Review and restrict changes to .claude/settings.json, especially in pull requests.
  • Avoid running the CLI in CI/CD pipelines against untrusted repositories or external contributions.
  • Audit authentication helper values for unexpected content or shell metacharacters.
  • Restrict and review access to Claude Code configuration files.

Which Assets and Systems Are at Risk?

Will Patching CVE-2026-35022 Cause Downtime?

Patch application impact: Low impact. Upgrade CLI (>2.1.91) and SDK (>0.1.55). Test before rollout.

Mitigation (if immediate patching is not possible): No downtime required. Disable authentication helpers, use environment variables, and restrict config changes. Reduces risk but does not fully fix the issue.

How Can You Detect CVE-2026-35022 Exploitation?

Exploitation Signatures:

Monitor for unusual child processes spawned by the Claude Code CLI, especially shell or network utilities. Activity involving environment variable access or external communication may indicate exploitation.

Indicators of Compromise (IOCs/IOAs):

Behavioral Indicators:

Alerting Strategy:

Remediation & Response

Compliance & Governance Notes

CVSS Breakdown Table

MetricValue Description
Base Score9.8 (Critical) Critical severity indicating high impact and exploitability
Attack VectorNetwork Can be exploited remotely
Attack ComplexityLowDoes not require complex conditions
Privileges RequiredNoneNo privileges required
User Interaction NoneNo user action required
Scope Unchanged Impact remains within the vulnerable component
Confidentiality Impact HighCan expose sensitive data such as credentials and environment variables
Integrity Impact HighAllows execution of arbitrary commands affecting system integrity
Availability ImpactHighMay impact system availability through command execution

Related Readings

One Platform for All Adversaries

See Fidelis in action. Learn how our fast and scalable platforms provide full visibility, deep insights, and rapid response to help security teams across the World protect, detect, respond, and neutralize advanced cyber adversaries.