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

Published Oct 16, 2026
·
Updated

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.

Other sources

The Claude Agent SDK for Python passed the resume option to the Claude CLI without validation, allowing a value beginning with - to be interpreted as a separate CLI flag. An attacker who controlled the resume value could inject an --mcp-config flag 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.

— GitHub

Affected Software

2 affected componentsFixes available
pypi/claude-agent-sdk<0.2.121
pip/claude-agent-sdk<0.2.121
0.2.121

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade pip/claude-agent-sdk to a version that resolves this vulnerability.

    Fixed in 0.2.121
  2. Upgrade

    Upgrade claude-agent-sdk to a version that resolves this vulnerability.

    Fixed in 0.2.121

Event History

Oct 16, 2026
CVE Published
via MITRE·07:44 PM
Data Sourced
via MITRE·07:44 PM
DescriptionWeakness
Advisory Published
via GitHub·07:44 PM
Data Sourced
via GitHub·07:44 PM
DescriptionWeaknessAffected Software

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203