Argument injection in Claude Agent SDK lets attackers run commands
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- None
- Attack complexity
- Low
- Attack requirements
- Present
- Impact type
- Code execution
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-78.
Summary
The Claude Agent SDK for Python before 0.2.121 passes the resume option to the Claude CLI without validation, so a value starting with a dash is parsed as a CLI flag (CWE-88). When an application passes untrusted input as the session ID, an unauthenticated remote attacker can inject the --mcp-config flag to define a stdio MCP server that runs arbitrary commands at CLI startup, outside the SDK permission controls.
Written with Claude Haiku 5.5 from the sources below · 2026-10-28
Description from the CNA
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- Yes
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| anthropics | claude-agent-sdk-python | before 0.2.121 | 0.2.121 | Patch available | CNA |
| — | claude-agent-sdk (PyPI) | before 0.2.121 | 0.2.121 | Patch available | GHSA-h4mw-j7qp-8mwm |
- claude-agent-sdk-python Vendoranthropics Affected before 0.2.121 Fixed in 0.2.121 Patch available CNA
- claude-agent-sdk (PyPI) Vendor— Affected before 0.2.121 Fixed in 0.2.121 Patch available GHSA-h4mw-j7qp-8mwm
Remediation
Upgrade the claude-agent-sdk package on PyPI to version 0.2.121, which fixes the issue. The sources list no fixed version for claude-agent-sdk-python.
Written with Claude Haiku 5.5 from the sources below · 2026-10-28
- Fix · CNA claude-agent-sdk-python (anthropics) Fixed in 0.2.121
- Fix · GHSA-h4mw-j7qp-8mwm claude-agent-sdk (PyPI) Fixed in 0.2.121 Advisory →
Timeline
- 2026-10-18 Threatist record created from CVE-2026-96620
- 2026-10-18 Alias added: GHSA-h4mw-j7qp-8mwm
- 2026-10-18 Fix available: PyPI/[email protected] · GHSA-h4mw-j7qp-8mwm
- 2026-10-18 CVSS score added · GHSA-h4mw-j7qp-8mwm
- 2026-10-18 Weakness changed · GHSA-h4mw-j7qp-8mwm
- 2026-10-18 5 new references · GHSA-h4mw-j7qp-8mwm
- 2026-10-21 CISA SSVC decision points changed
- 2026-10-25 EPSS moved to the 50th–90th percentile
References
Other 5
- https://github.com/anthropics/claude-agent-sdk-python/security/advisories/GHSA-h4mw-j7qp-8mwm
- https://github.com/anthropics/claude-agent-sdk-python/pull/1123
- https://github.com/anthropics/claude-agent-sdk-python/commit/347a1cb88d7652199399db1b7f914e0a459a6662
- https://github.com/anthropics/claude-agent-sdk-python/releases/tag/v0.2.121
- https://github.com/anthropics/claude-agent-sdk-python
More anthropics vulnerabilities
- TI-2026-79288 Out-of-bounds write in Google Brotli decoder KEVCVSS 4.0CRITICAL 9.2
- TI-2026-00421 MCP TypeScript SDK UriTemplate Exploded Array Pattern ReDoS CVSS 4.0HIGH 8.7
- TI-2025-40558 Claude Code Command Validation Bypass Allows Arbitrary Code Execution CVSS 4.0HIGH 8.7
- TI-2025-36683 Claude Code vulnerable to arbitrary code execution caused by maliciously configured git email CVSS 4.0HIGH 8.7
- TI-2025-24240 Anthropic Slack MCP Server Data Exfiltration via Link Unfurling CVSS 4.0CRITICAL 9.3
- TI-2025-32918 Claude Code IDE extensions allow websocket connections from arbitrary origins CVSS 4.0HIGH 8.8
Sources
- CVE-2026-96620 · CVE Program
- CVE-2026-96620 · NVD
- FIRST EPSS
- GHSA-h4mw-j7qp-8mwm · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences