GHSA-h4mw-j7qp-8mwm: Input Validation

Published Oct 16, 2026
·
Updated

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.

Affected Software

1 affected componentFixes available
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

Event History

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

Frequently Asked Questions

1

Which applications are exposed to this issue?

Applications are exposed only if they pass untrusted input as the session ID through the SDK's resume option. The attacker must be able to control that resume value.

2

What does an attacker need to provide to exploit it?

The attacker needs to supply a resume value beginning with a hyphen so it is interpreted as a Claude CLI option rather than a session ID. This can inject an --mcp-config option that defines a stdio MCP server and executes a command when the CLI starts.

3

What is the impact of successful exploitation?

Successful exploitation can result in arbitrary command execution at Claude CLI startup. The injected execution bypasses the SDK's permission controls.

4

What should teams do if they use the affected package?

Update the claude-agent-sdk package to the latest version. Until updating, do not pass untrusted or externally controllable values as session IDs to the resume option.

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