CVE-2026-96620anthropics claude-agent-sdk-python
Command Injection in Claude Agent SDK Python via Insufficient Parameter Validat…
Critical 9.2 No auth needed
Follow: this CVE · anthropics · anthropics claude-agent-sdk-python We alert you by email or Slack (account required).
- Priority
- 70
- CVSS 4.0
- 9.2
- EPSS
- —
- Auth required
- No
- Published
- Oct 16, 2026
- Updated
- Oct 21, 2026
- Category
- Application · Cross-platform
- SSVC (CISA)
- Exploitation: none · Automatable: yes · Technical impact: total
- Vector
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X
What happens
Claude Agent SDK Python prior to version 0.2.121 fails to properly validate the session resume parameter, allowing an attacker to inject CLI flags such as --mcp-config. This enables arbitrary command execution at CLI startup outside SDK permission controls when the application passes untrusted input as a session ID.
Show the original NVD text
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.
What to do
Patch available · fixed versions: 0.2.121
Update claude-agent-sdk to version 0.2.121 or later.
- Apply the vendor's security update for claude-agent-sdk-python.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| PyPI | claude-agent-sdk |
< 0.2.121 |
0.2.121 |
pip install "claude-agent-sdk>=0.2.121" |
Per OSV / GitHub Advisories (GHSA-h4mw-j7qp-8mwm). Check the version in your lockfile before upgrading.
Affected products
- anthropics · claude-agent-sdk-python
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
On social media
1 person and 2 posts on Bluesky in the last 30 days.
Most recent posts, without bots or automated feeds. The text belongs to its authors. Search on Bluesky
Official sources
References
Links published by the sources. Open them with care.