Arbitrary Command Execution Vulnerability in Claude Agent SDK by Anthropic
CVE-2026-96620
9.2CRITICAL
What is CVE-2026-96620?
The Claude Agent SDK, a Python SDK for Claude Code, contains a vulnerability that allows an attacker to exploit the resume option passed to the Claude CLI. This flaw manifests when untrusted input is used as the session ID during the resume process. As a result, an attacker can inject the '--mcp-config' flag to set a stdio MCP server, leading to arbitrary command execution at CLI startup beyond the control of the SDK's permission system. This issue has been addressed in version 0.2.121, where appropriate input validation has been implemented to mitigate the risk of this vulnerability.
Affected Version(s)
claude-agent-sdk-python < 0.2.121
