CVE 8.4 HIGH

Anthropic Claude Code & Agent SDK OS Command Injection via promptEditor.ts_CVE-2026-35021

8.4 / 10
HIGH
CVSS:4.0/AV:L/AC:L/AT:N/PR:N/UI:A/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N

Description

Anthropic Claude Code CLI and Claude Agent SDK contain an OS command injection vulnerability in the prompt editor invocation utility that allows attackers to execute arbitrary commands by crafting malicious file paths. Attackers can inject shell metacharacters such as $() or backtick expressions into file paths that are interpolated into shell commands executed via execSync. Although the file path is wrapped in double quotes, POSIX shell semantics (POSIX ยง2.2.3) do not prevent command substitution within double quotes, allowing injected expressions to be evaluated and resulting in arbitrary command execution with the privileges of the user running the CLI.

Basic Information

ID CVE-2026-35021
Source VulnCheck
Published Apr 6, 2026 at 18:59
Modified Apr 7, 2026 at 15:10

Affected Product

Vendor Anthropic
Product Claude Code
Affected Versions Anthropic Claude Code 0
Anthropic Claude Agent SDK for Python 0

CWE Classification

References

๐Ÿ’ญ Join the Security Discussion

๐Ÿ”’ Your email address will not be published. Required fields are marked *

โš ๏ธ Please be respectful and constructive in your comments. Security discussions should remain professional.