CVE-2026-96620: How an Unvalidated “resume” Option Lets Attackers Run Commands in the Claude Agent SDK for Python (CVSS 9.2)

By Carlos Montiel | Enterprise AI Specialist
Leer en español →
Published: 2026-10-23 | By: Carlos Montiel | Reading time: ~5 minutes
CVE-2026-96620: how an unvalidated “resume” option allows command execution in the Claude Agent SDK for Python (CVSS 9.2)

On October 16, CVE-2026-96620 was published: a critical flaw (CVSS v4.0 score of 9.2) in the Claude Agent SDK for Python, where an option meant for resuming sessions could become a path to run commands outside the SDK's permission controls.

How the Vulnerability Works

According to the OSV record (advisory GHSA-h4mw-j7qp-8mwm), before version 0.2.121 the SDK passed the resume option to the Claude CLI as a separate argument, without validating it. If the value starts with a hyphen, the CLI parses it as a standalone flag. An attacker can inject --mcp-config to define a stdio-type MCP server, which runs arbitrary commands when the CLI starts, and that happens outside the SDK's permission controls.

Application → resume = "--mcp-config ..." (untrusted input) SDK → claude --resume --mcp-config ... (not validated) CLI → reads --mcp-config as its own flag MCP stdio → runs the command at startup (outside SDK permissions)

This is a classic argument injection (CWE-88), alongside CWE-20 and CWE-78. What makes it interesting for agents: the attacker doesn't need to trick the model with a prompt. It's enough for the application to forward a session identifier from the outside world to the SDK.

Who Is Affected and What the Fix Is

Package: claude-agent-sdk-python (github.com/anthropics) Affected: all versions before 0.2.121 Fixed in: 0.2.121 Severity: 9.2 Critical (CVSS v4.0, AV:N/AC:L/AT:P/PR:N/UI:N) Published: 2026-10-16

The key condition is that the application passes untrusted input as the session ID to resume. An internal script that only resumes sessions it created itself isn't exposed through this path; a web service that accepts the session ID from a URL parameter, a JSON body or an external client is.

What Is Known (and Not Known) About Exploitation

According to the databases consulted, as of October 21 SecurityOnline reported no confirmed exploitation and no public exploit was found; the vulnerability wasn't listed in CISA's KEV catalog and its EPSS was around 0.58%. These are third-party data points that can change: check the current status before deciding how urgent this is.

Don't mix them up: CVE-2026-52869 in the MCP Python SDK (before 1.27.2) is a different problem, involving HTTP sessions that don't verify who created them. It's a different component and a different CVE.

What This Means for a Company Building Agents

1. Upgrade to 0.2.121 or later in any service that uses the Python SDK. Check with pip show claude-agent-sdk and in your lockfile.

2. Never pass external input straight into SDK options. Validate session IDs against an expected format (a UUID, for example) or against a table of your own sessions, and reject any value that starts with -.

3. Treat MCP configuration as a code-execution surface. A stdio MCP server is a system command; limit which processes the service user can launch and run the agent with least privilege.

4. Inventory your agents. This flaw fits a pattern that keeps repeating in 2026: agents fail less because of the model and more because of the glue code that feeds them parameters.

Sources: OSV CVE-2026-96620 (modified Oct 22, 2026) and vulnerability aggregators (OpenCVE, Vulert, SecurityOnline) for exploitation status.

Carlos Montiel
Enterprise AI Solutions Architect
Specialist in LLMs, Agents, and Orchestration
guatemalia.com/#contacto · info@guatemalia.com

Need to implement AI in your company?

Carlos Montiel is an enterprise AI solutions architect. He implements LLMs, Agents, RAG, and orchestrators for companies across Guatemala and Latin America. Reach out for a consultation.

Contact Carlos Montiel

info@guatemalia.com