Skip to main content
Live Webinar with SANS (June 25)— Agentic CTI Automation for Fun & ProfitRegister Free
Mallory
HighPublic exploit

OS Command Injection in Anthropic Claude Code CLI and Claude Agent SDK via TERMINAL environment variable

IdentifiersCVE-2026-35020CWE-78· Improper Neutralization of Special…

CVE-2026-35020 is an OS command injection vulnerability in Anthropic Claude Code CLI and the Claude Agent SDK. The flaw is described as residing in the command lookup helper and the deep-link terminal launcher, where attacker-controlled input from the TERMINAL environment variable is incorporated into shell command construction and executed via /bin/sh with shell=true. Because shell metacharacters embedded in TERMINAL are interpreted by the shell, a local attacker can inject arbitrary commands. The issue can be reached during normal CLI execution as well as through the deep-link handler path, leading to command execution in the security context of the user running the CLI.

Share:
For your environment

Are you exposed to this one?

Mallory correlates every CVE against your assets, your vendors, and active adversary campaigns. Know which vulnerabilities matter for you, not just which ones are loud.

ANALYST BRIEF

Impact, mitigation & remediation

What it means. What to do now. Patch path, mitigations, and the assume-compromise checklist.

Impact

What an attacker gets, and what they’ve been doing with it.

Successful exploitation allows arbitrary command execution with the privileges of the user invoking the Claude Code CLI or affected SDK component. Given the stated CVSS impact metrics, this can result in high-impact compromise of confidentiality, integrity, and availability for data and resources accessible to that user account, including potential credential theft, modification of local files or configuration, and disruption of the user's environment or workflows.

Mitigation

If you can’t patch tonight, do this now.

Until patched versions are deployed, avoid running the affected CLI or SDK in environments where the TERMINAL environment variable can be influenced by untrusted parties. Sanitize or unset TERMINAL before invoking the tooling, especially in shared shells, automation contexts, wrappers, deep-link handlers, and CI/CD environments. Restrict local access to systems running the affected software and monitor for suspicious child-process execution spawned by the CLI or SDK.

Remediation

Patch, then assume compromise.

Apply the vendor-provided fix or upgrade to a version of Anthropic Claude Code CLI and Claude Agent SDK that no longer passes attacker-controlled TERMINAL values into shell command construction with shell=true. Remediation should include eliminating shell-based command construction for terminal lookup/launch paths, invoking executables without a shell, and strictly validating or allowlisting terminal program names derived from environment variables before use.
PUBLIC EXPLOITS

Exploits

No public exploits tracked yet. Mallory keeps watching.

VALID 0 / 0 TOTALView more in app

No public exploit code observed for this vulnerability.

EXPOSURE SURFACE

Affected products & vendors

Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.

VendorProductType
AnthropicClaude Agent Sdkapplication
AnthropicClaude Codeapplication
AnthropicClaude Code Cliapplication

Vendor-confirmed product mapping. Mallory continuously reconciles this list against your asset inventory.

What this page doesn’t show

The version that knows your environment.

This page is what’s public. Mallory adds the parts that aren’t: which of your assets are affected, which adversaries are exploiting it right now, which detections to deploy, and what to do tonight.
Exposure mapping

Query your assets running an affected version, and investigate the blast radius.

Threat actor evidence

Every observed campaign linking this CVE to a named adversary.

Associated malware

Malware families riding this exploit, with evidence and IOCs.

Detection signatures

YARA, Sigma, Snort, and vendor rules, auto-deployed to your SIEM.

Vendor-by-vendor mapping

Cross-references every affected SKU, including bundled OEM variants.

Social activity3

Community discussion across Reddit, Mastodon, and other social sources.