CVE-2026-96620 Claude Agent SDK: Argument Injection via resume Option Allows Arbitrary Command Execution

Critical 9.2 Published Updated

Attackers can execute arbitrary commands by injecting CLI flags via the resume option in the Claude Agent SDK.

Exploited in the wild
Not known
Login needed
Not needed
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2026-96620?

CVE-2026-96620 is a critical command injection vulnerability in anthropics claude-agent-sdk-python, published on 16 Oct 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

Official 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.

Weakness: CWE-88, CWE-78, CWE-20

Which versions are affected by CVE-2026-96620?

2 open source packages ship an affected version, including claude-agent-sdk.

PackageAffectedFixed in
claude-agent-sdk PyPIAll versions0.2.121
claude-agent-sdk PyPIAll versions0.2.121

How do I fix CVE-2026-96620?

Upgrade claude-agent-sdk to 0.2.121 or later.

Upgrade, and pass arguments to programs as a list instead of through a shell. More about Command injection.

Is CVE-2026-96620 being exploited?

There is no known exploitation of CVE-2026-96620 in the wild and no public exploit code.

Sources

Also known as GHSA-h4mw-j7qp-8mwm.

Is CVE-2026-96620 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free