Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessSupply crafted session ID to application
-
DeliveryApplication forwards value to SDK resume option
-
ExploitSDK emits it as separate CLI argument
-
ExecutionCLI parses injected --mcp-config flag
-
ImpactStdio MCP server executes arbitrary command bypassing permissions
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V2 - Validation and Business Logic Input validation, allowlisting
|
| Exploitation Conditions | Exploitation requires the host application to pass untrusted/attacker-controlled input directly into the SDK's |
| Impact | No CVSS vector, EPSS score, KEV listing, or SSVC decision data was provided, so several standard prioritization signals are missing and must be stated as such rather than assumed. The vulnerability itself is high-impact - argument injection in the Claude Agent SDK for Python lets an attacker-controlled |
| Exploit ScenarioDerived | An application built on claude-agent-sdk accepts a session ID from an external/untrusted source (e.g. an HTTP parameter or user-supplied job record) and passes it directly to the SDK's |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 16, 2026
Argument injection in the Claude Agent SDK for Python (claude-agent-sdk) before 0.2.121 allows remote attackers to achieve arbitrary command execution when an embedding application passes untrusted input into the SDK's resume option. Because --resume is declared by the Claude CLI with an optional value, a session identifier beginning with - is parsed as a separate CLI flag rather than the option's value, letting an attacker inject --mcp-config and register a stdio MCP server that executes arbitrary commands at CLI startup while bypassing the SDK's permission controls. The assessed CVSS:3.1 vector (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H) indicates no authentication is required but exploitation is high-complexity and conditional on the host application forwarding attacker-controlled data as the session ID; a vendor patch is available as version 0.2.121, and no public exploit code was identified at time of analysis.
RemediationAI
Upgrade to claude-agent-sdk 0.2.121 or later (vendor-released patch; release at https://github.com/anthropics/claude-agent-sdk-python/releases/tag/v0.2.121), which adopts the bound --resume=value and --session-id=value argv form so dash-leading values cannot be parsed as separate CLI flags. The fix is documented in advisory GHSA-h4mw-j7qp-8mwm and PR #1123 (commit 347a1cb88d7652199399db1b7f914e0a459a6662). Until patching is possible, the effective compensating control is to stop routing untrusted data into the resume option: validate session identifiers against a strict allowlist (for example, the expected UUID format), reject any value beginning with -, and never accept a session ID directly from an untrusted user or external system. Applications that only resume server-generated session IDs are inherently not exposed, so narrowing the source of session IDs removes the attack path with no functional loss; a broader but more fragile alternative is to sanitize the generated argv before subprocess launch, which carries the trade-off of being bypassable if argument construction changes. Because exploitation requires the host application to pass attacker-controlled input as the session ID, reviewing that data flow is as important as applying the update.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 2 packages in pypi, euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The flaw is an argument-injection issue (CWE-20, improper input validation) in the Python SDK's subprocess transport for the Claude CLI. In src/claude_agent_sdk/_internal/transport/subprocess_cli.py, _build_command() previously emitted the resume option as two separate argv tokens (["--resume", value]). The Claude CLI declares --resume with an optional value, so a value that begins with a dash is not bound to the flag and is instead treated as an independent CLI option. An attacker controlling that value can supply a flag such as --mcp-config pointing to an attacker-defined stdio MCP server; the CLI then spawns that server's command at startup, giving arbitrary command execution that occurs outside the SDK's permission-control layer. The same two-token construction was used for --session-id. The upstream fix (PR #1123, commit 347a1cb88d7652199399db1b7f914e0a459a6662) switches both options to the bound --flag=value form so the value can never detach into a standalone argv flag, and the CLI subsequently rejects the malformed value as an invalid session ID. Test additions explicitly assert that dash-leading values no longer appear as separate tokens.
Know when Python gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:H/VA:H/SC:N/SI:N/SA:N
Arbitrary command execution gives C/I/A High and no SDK auth gives PR:N, but exploitation depends on the application routing untrusted input into resume (a condition outside the attacker's control), so AC:H.
Primary rating from Vendor (https://github.com/anthropics/claude-agent-sdk-python).
CVSS VectorVendor: https://github.com/anthropics/claude-agent-sdk-python
Lifecycle Timeline
2DescriptionCVE.org
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.
Articles & Coverage 1
Technical POC Analysis
CWE-20 Improper Input Validation, specifically argument injection (advisory also lists CWE-88).
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
A critical vulnerability in the Claude Agent SDK for Python (versions before 0.2.121) allows an attacker to execute arbitrary commands on any host system running an application built with this SDK, whenever that application forwards untrusted input as a session identifier. Because the flaw can be triggered remotely without authentication and yields full compromise of confidentiality, integrity, and availability, any business unit shipping or operating agent-based tooling, developer automation, or customer-facing AI services on this SDK is exposed. Leadership should treat this as a priority remediation item given the potential for downstream compromise of build pipelines, internal systems, and customer data.
Apply vendor patch. Given the vendor-released fix in claude-agent-sdk 0.2.121 is available, patching is the primary control; where immediate upgrade is not possible, interim mitigations include blocking untrusted input from reaching the resume option, validating and allow-listing session identifiers to reject values starting with a hyphen, running affected applications with least-privilege service accounts and restricted MCP configuration paths, and monitoring CLI startup for unexpected --mcp-config or stdio MCP server registration. No public exploit code was identified at time of analysis.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Authentication bypass attacks exploit flaws in the verification mechanisms that control access to systems and applications.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
EUVD-2026-103155
GHSA-h4mw-j7qp-8mwm
NVD
CVE.org
Exploit-DB