Skip to main content
Mallory

Command Injection Flaws Expose OpenClaw and Anthropic Claude Code to RCE

endpoint-software-vulnerabilityinternet-facing-service-vulnerabilitywidely-deployed-product-advisory
Updated April 6, 2026 at 10:00 PM3 sources
Share:
Command Injection Flaws Expose OpenClaw and Anthropic Claude Code to RCE

Get Ahead of Threats Like This

Know if you're exposed. Before adversaries strike.

Two high-severity command injection vulnerabilities have been disclosed in developer tooling and automation software, enabling arbitrary command execution through improperly sanitized shell inputs. CVE-2026-32917 affects OpenClaw versions earlier than 2026.3.13, where the iMessage attachment staging workflow passes unsanitized remote attachment paths directly into an SCP remote operand. If remote attachment staging is enabled, an unauthenticated attacker can use shell metacharacters in attachment paths to execute commands on configured remote hosts; the flaw is tracked as CWE-78 and carries a CVSS v3.1 rating of AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H.

A separate issue, CVE-2026-35020, impacts Anthropic Claude Code CLI and the Claude Agent SDK, where attacker-controlled input from the TERMINAL environment variable can reach /bin/sh with shell=true through the command lookup helper and deep-link terminal launcher. A local attacker can exploit the bug during normal CLI use or via the deep-link handler to run arbitrary commands with the privileges of the invoking user. Both disclosures highlight continued risk from unsanitized shell metacharacters in application workflows, with OpenClaw publishing a fixing commit and security advisory alongside third-party vulnerability reporting.

Timeline

  1. Apr 6, 2026

    CVE-2026-35021 publicly disclosed

    CVE-2026-35021 was disclosed as a high-severity OS command injection vulnerability affecting Anthropic Claude Code CLI and the Claude Agent SDK. The flaw in the prompt editor invocation utility allowed malicious file paths containing shell metacharacters such as $() or backticks to trigger arbitrary command execution via execSync as the local user.

  2. Apr 6, 2026

    CVE-2026-35020 publicly disclosed

    CVE-2026-35020 was disclosed as a high-severity OS command injection vulnerability affecting Anthropic Claude Code CLI and the Claude Agent SDK. The flaw involved attacker-controlled input from the TERMINAL environment variable being passed to /bin/sh with shell=true, enabling arbitrary command execution as the local user.

  3. Mar 31, 2026

    CVE-2026-32917 publicly disclosed

    CVE-2026-32917 was publicly disclosed as a high-severity remote command injection vulnerability affecting OpenClaw versions before 2026.3.13. The issue was classified as CWE-78 and described as allowing arbitrary command execution when remote attachment staging is enabled.

  4. Mar 13, 2026

    OpenClaw fixes remote command injection in version 2026.3.13

    OpenClaw addressed CVE-2026-32917 in release 2026.3.13, fixing a flaw in iMessage attachment staging where unsanitized attachment paths were passed to SCP and could enable remote command execution on configured hosts.

See the full picture in Mallory

Mallory subscribers get deeper analysis on every story, including:

Impact Assessment

Who’s affected and how

Technical Details

Deep-dive technical analysis

Response Recommendations

Actionable next steps for your team

Indicators of Compromise

IPs, domains, hashes, and more

AI Threads

Ask questions and take action on every story

Advanced Filters

Filter by topic, classification, timeframe

Scheduled Alerts

Get matching stories delivered automatically

Related Stories

Critical Vulnerabilities in Anthropic Claude Code Enable RCE and API Key Theft via Malicious Repositories

Critical Vulnerabilities in Anthropic Claude Code Enable RCE and API Key Theft via Malicious Repositories

**Check Point Research** disclosed multiple critical vulnerabilities in Anthropic’s *Claude Code* AI coding assistant that could allow **remote code execution** and **credential theft** when a developer clones and opens an **untrusted repository**. The reported attack path abuses repository-controlled configuration and automation features (including **Hooks**, **MCP servers**, and **environment variables**) to trigger hidden shell command execution and to exfiltrate **Anthropic API credentials**, potentially enabling a pivot from a developer workstation into broader enterprise environments where Claude-related workflows and shared resources are accessible. The issues include consent-bypass and command-execution weaknesses tracked under **CVE-2025-59536** (covering closely related flaws involving repository configuration executing commands without adequate user consent) and an API credential exposure issue tracked as **CVE-2026-21852**, which affected *Claude Code* versions prior to **2.0.65** and enabled API key theft via malicious project configurations. Anthropic has **patched** the vulnerabilities and advised users to update to the latest version, while indicating additional hardening measures are planned to reduce supply-chain risk from malicious commits and repository-level configuration abuse.

3 weeks ago
Vulnerabilities in Anthropic Claude Code Enable Code Execution and API Key Exfiltration

Vulnerabilities in Anthropic Claude Code Enable Code Execution and API Key Exfiltration

Security researchers disclosed multiple vulnerabilities in **Anthropic’s Claude Code** AI coding assistant that could enable **arbitrary command execution** and **exfiltration of Anthropic API credentials** when developers clone/open a malicious repository. Check Point Research reported the issues abuse Claude Code configuration and initialization paths—particularly **project hooks** (e.g., untrusted `.claude/settings.json`), **Model Context Protocol (MCP) servers**, and **environment variables**—to trigger shell command execution and data theft. Anthropic’s advisory for **CVE-2026-21852** describes a project-load flow where a crafted repo can set `ANTHROPIC_BASE_URL` to an attacker-controlled endpoint, causing Claude Code to send API requests **before** the trust prompt is shown, potentially leaking the user’s API key. The disclosed issues include two high-severity code-injection paths (CVSS **8.7**) and one information-disclosure flaw (CVSS **5.3**): a consent-bypass/hook-based injection issue fixed in *Claude Code* **1.0.87** (Sept 2025), **CVE-2025-59536** fixed in **1.0.111** (Oct 2025), and **CVE-2026-21852** fixed in **2.0.65** (Jan 2026). Separate coverage framed Anthropic-related developments as market-moving, noting investor attention around Anthropic’s AI code-security tooling; however, the actionable security impact in this reporting is the risk that simply opening an attacker-controlled repository can lead to **RCE** and **credential leakage**, reinforcing the need to treat untrusted repos and tool initialization behaviors as a supply-chain and developer-workstation risk.

3 weeks ago
Multiple OpenClaw Flaws Enable Code Execution and Consent Bypass

Multiple OpenClaw Flaws Enable Code Execution and Consent Bypass

OpenClaw disclosed several high-severity vulnerabilities that can lead to arbitrary code execution and security control bypass across recent releases. **CVE-2026-35641** affects versions before `2026.3.24` and lets a malicious local plugin or hook package use a crafted `.npmrc` file to override the `git` executable during `npm install`, resulting in arbitrary program execution. **CVE-2026-41349** affects versions before `2026.3.28` and allows low-privileged remote attackers to bypass execution approval through `config.patch`, silently disabling agentic consent protections. Belgium's Centre for Cybersecurity warned that multiple OpenClaw flaws can lead to RCE and urged immediate patching. Additional OpenClaw issues published shortly after expand the attack surface. **CVE-2026-41336** affects versions before `2026.3.31` and allows workspace `.env` files to override `OPENCLAW_BUNDLED_HOOKS_DIR`, causing trusted bundled hooks to be replaced with attacker-controlled code from untrusted workspaces. **CVE-2026-41352**, also fixed in `2026.3.31`, allows a device-paired node to bypass the node scope gate and execute arbitrary node commands on the host without proper pairing validation. Separately, the Node.js package **simple-git** disclosed **CVE-2026-6951**, an RCE flaw in versions before `3.36.0` caused by incomplete blocking of Git configuration options, allowing attackers to abuse `--config`, enable `protocol.ext.allow=always`, and trigger execution through an `ext::` clone source when untrusted input reaches the library's options.

1 weeks ago

Get Ahead of Threats Like This

Mallory continuously monitors global threat intelligence and correlates it with your attack surface. Know if you're exposed. Before adversaries strike.

Command Injection Flaws Expose OpenClaw and Anthropic Claude Code to RCE | Mallory