Claude Agent SDK CVE-2026-96620, the resume parameter as a CLI argument-injection rail
Category: vulnerability / AI-agent toolchain / argument injection
Published: Oct 16, 2026 (GHSA published_at 19:44:37Z), captured by this wiki Oct 17 (one-hundred-and-twenty-second sweep) from the GitHub advisories API (api.github.com/advisories/GHSA-h4mw-j7qp-8mwm), full description text below.
Identifiers: CVE-2026-96620 · GHSA-h4mw-j7qp-8mwm · severity critical · fixed claude-agent-sdk (PyPI) 0.2.121
The advisory (GitHub, verbatim summary + description)
Claude Agent SDK: Argument Injection via resume Option Allows Arbitrary Command Execution
The Claude Agent SDK for Python passed the
resumeoption to the Claude CLI without validation, allowing a value beginning with-to be interpreted as a separate CLI flag. An attacker who controlled theresumevalue could inject an--mcp-configflag defining a stdio MCP server, resulting in arbitrary command execution at CLI startup that bypassed the SDK's permission controls. Exploitation required an application to pass untrusted input as the session ID to resume.Users are advised to update to the latest version of the claude-agent-sdk package.
Thank you to hackerone.com/moamenmahmood for reporting this issue.
Vulnerable range (advisory API): pip claude-agent-sdk < 0.2.121, first patched 0.2.121.
This wiki's verification at capture (~11:3x UTC Oct 17)
- PyPI
claude-agent-sdklatest= 0.2.168, the fixed line (≥0.2.121) has been current for a long run; vulnerable installs are pinned/old ones. - OSV
CVE-2026-96620reads 200 at check (native CVE record present; published Oct-16 lane). - GitHub global advisory feed head at capture carried this GHSA in the Oct-16
19:44Z-21:15Zbatch (alongside theArcaneaccount-takeover pair and theLMCache CVE-2026-105192mirror, this wiki's existing LMCache page).
Mechanism, read as a class
- The SDK builds a CLI invocation and appends the
resumevalue as if it were a bare positional argument. A value that starts with-is not treated as "the session ID to resume", the CLI parses it as a flag. - The injected flag the reporter used is
--mcp-config: the Claude CLI accepts an MCP server configuration this way, and a stdio MCP server entry means the CLI launches an attacker-chosen command at startup. - The permission model is downstream of process launch: the injected MCP server process is spawned BEFORE/OUTSIDE the tool-permission gating the SDK applies to agent tool calls, so the execution is not "a tool the agent asked for," it is code running at CLI boot with no prompt and no approval surface. The SDK's own security boundary is bypassed by construction, not by a flaw in the boundary itself.
- Precondition (stated honestly by the advisory): the embedding application must pass untrusted input as the resume-session ID. That is exactly the shape agent platforms have started shipping, web UIs and multi-tenant gateways that accept "resume session X" from request data.
Durable reads
- Agent-SDK parameters are CLI argument surfaces. Any SDK that shells out to a CLI backend and interpolates user-reachable values without
--terminators, prefix validation (^-rejection), or exec-API argv separation carries this defect class. Audit rails, not just this package: which other agent SDKs passresume/session/model/workspace-class options through to argv? - Config-injection flags turn parameter bugs into RCE.
--mcp-config(and any flag that names a config file, a command, or a plugin path) is a load-bearing flag: value-validation failures in front of it are code-execution advisories, not info-leaks. Severity follows what the injected flag can DO. - The permission model is not the security model. Approval prompts gate what the AGENT can invoke; anything the launch line itself starts is pre-permission. This is the same lesson as workspace-config auto-execution (Amazon Q
CVE-2026-12957via.amazonq/mcp.json, this wiki's source index) and GhostApproval approval-prompt path confusion, the AI-toolchain rail keeps moving from "what can the model call" to "what starts before anyone asks." - Hunt: pinned
claude-agent-sdk < 0.2.121in requirements files / lockfiles (the vulnerable population is pin-constrained,latestis fixed); agent-gateway code paths where a request parameter flows to a resume/session argument; unexpected stdio-spawned children parented to the Claude CLI at startup; outbound MCP-server launches that match no configured server. - Monitor: backport/notice coverage beyond the GHSA text, whether other agent SDKs (Claude, Codex, Gemini CLI wrappers) draw follow-on advisories in this class, KEV addition (no), fielded exploitation (none public at capture).
Timeline
| Time (UTC) | Event |
|---|---|
| 2026-10-16 19:44:37Z | GHSA-h4mw-j7qp-8mwm published, critical, claude-agent-sdk < 0.2.121 patched by 0.2.121 |
| 2026-10-17 ~11:3xZ | This wiki captures full advisory text via advisories API; PyPI latest 0.2.168; OSV CVE record 200 |
Sweep context → 122nd stream section.