An attacker can inject the --mcp-config flag to define a stdio MCP server, causing arbitrary command execution at CLI startup outside the SDK permission controls.
- CVSS
- 9.2Critical
- Chance of exploitation (EPSS)
- 0.71%
- Published
- Oct 16, 2026
- In the news
- Not yet
What to do
A critical command injection flaw in Anthropics Claude-agent-sdk-python that can be attacked over the network without logging in. No attacks are reported yet, but patch it soon.
Action: Check the vendor's advisory in the references and apply updates as soon as they are available.
Affected versions
- Anthropics Claude-agent-sdk-python
- < 0.2.121
Description
Claude Agent SDK is a Python SDK for Claude Code. Prior to 0.2.121, the resume option is passed to the Claude CLI as a separate token without validation, so a dash-leading value is parsed as an independent CLI flag. An attacker can inject the --mcp-config flag to define a stdio MCP server, causing arbitrary command execution at CLI startup outside the SDK permission controls. The issue is exploitable when an application passes untrusted input as the session ID to resume. This issue is fixed in version 0.2.121.
Affected products
Get alerts for these →Timeline 1
Latest change: CVE-2026-96620 published (CVSS 9.2) (Oct 16, 2026)
News, advisories, exploit code, scanner detection and exploitation, newest first.
Fri, Oct 16, 2026
- CVECVE-2026-96620 published (CVSS 9.2)CVE Program · 20:18 UTC
References 4
- github.com /anthropics/claude-agent-sdk-python/commit/347a1cb88d7652199399db1b7f914e0a459a6662
- github.com /anthropics/claude-agent-sdk-python/pull/1123
- github.com /anthropics/claude-agent-sdk-python/releases/tag/v0.2.121
- github.com /anthropics/claude-agent-sdk-python/security/advisories/GHSA-h4mw-j7qp-8mwm