CVE-2026-35020: CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in Anthropic Claude Code
Anthropic Claude Code CLI and Claude Agent SDK contain an OS command injection vulnerability in the command lookup helper and deep-link terminal launcher that allows local attackers to execute arbitrary commands by manipulating the TERMINAL environment variable. Attackers can inject shell metacharacters into the TERMINAL variable which are interpreted by /bin/sh when the command lookup helper constructs and executes shell commands with shell=true. The vulnerability can be triggered during normal CLI execution as well as via the deep-link handler path, resulting in arbitrary command execution with the privileges of the user running the CLI.
AI Analysis
Technical Summary
Anthropic Claude Code CLI and Claude Agent SDK contain an OS command injection vulnerability (CWE-78) due to unsafe handling of the TERMINAL environment variable. The command lookup helper and deep-link terminal launcher execute shell commands with shell=true, interpreting injected shell metacharacters. This allows local attackers to execute arbitrary commands with user-level privileges during normal CLI execution or through the deep-link handler. The vulnerability is identified as CVE-2026-35020 with a CVSS 4.0 score of 8.6 (high severity). No patch or official remediation level has been provided as of the publication date.
Potential Impact
Successful exploitation allows local attackers to execute arbitrary OS commands with the privileges of the user running the Anthropic Claude Code CLI or Agent SDK. This can lead to unauthorized actions on the affected system, potentially compromising system integrity and confidentiality at the user privilege level. There are no known exploits in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, avoid running the Anthropic Claude Code CLI or Agent SDK in untrusted environments or with untrusted environment variables. Restrict local access to trusted users only to reduce risk of exploitation.
CVE-2026-35020: CWE-78 Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in Anthropic Claude Code
Description
Anthropic Claude Code CLI and Claude Agent SDK contain an OS command injection vulnerability in the command lookup helper and deep-link terminal launcher that allows local attackers to execute arbitrary commands by manipulating the TERMINAL environment variable. Attackers can inject shell metacharacters into the TERMINAL variable which are interpreted by /bin/sh when the command lookup helper constructs and executes shell commands with shell=true. The vulnerability can be triggered during normal CLI execution as well as via the deep-link handler path, resulting in arbitrary command execution with the privileges of the user running the CLI.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
Anthropic Claude Code CLI and Claude Agent SDK contain an OS command injection vulnerability (CWE-78) due to unsafe handling of the TERMINAL environment variable. The command lookup helper and deep-link terminal launcher execute shell commands with shell=true, interpreting injected shell metacharacters. This allows local attackers to execute arbitrary commands with user-level privileges during normal CLI execution or through the deep-link handler. The vulnerability is identified as CVE-2026-35020 with a CVSS 4.0 score of 8.6 (high severity). No patch or official remediation level has been provided as of the publication date.
Potential Impact
Successful exploitation allows local attackers to execute arbitrary OS commands with the privileges of the user running the Anthropic Claude Code CLI or Agent SDK. This can lead to unauthorized actions on the affected system, potentially compromising system integrity and confidentiality at the user privilege level. There are no known exploits in the wild at this time.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. Until an official fix is available, avoid running the Anthropic Claude Code CLI or Agent SDK in untrusted environments or with untrusted environment variables. Restrict local access to trusted users only to reduce risk of exploitation.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-03-31T20:40:15.618Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69d409d70a160ebd92d5a92f
Added to database: 4/6/2026, 7:30:31 PM
Last enriched: 4/6/2026, 7:46:12 PM
Last updated: 4/7/2026, 6:59:02 AM
Views: 4
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.