CVE-2026-96620
Received Received - Intake

Command Injection in Claude Agent SDK

Vulnerability report for CVE-2026-96620, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-10-16

Last updated on: 2026-10-16

Assigner: GitHub, Inc.

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-10-16
Last Modified
2026-10-16
Generated
2026-10-17
AI Q&A
2026-10-17
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 1 associated CPE
Vendor Product Version / Range
anthropics claude-agent-sdk-python < 0.2.121

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-20 The product receives input or data, but it does not validate or incorrectly validates that the input has the properties that are required to process the data safely and correctly.
CWE-78 The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.
CWE-88 The product constructs a string for a command to be executed by a separate component in another control sphere, but it does not properly delimit the intended arguments, options, or switches within that command string.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

The vulnerability in Claude Agent SDK before version 0.2.121 allows an attacker to inject a malicious CLI flag (--mcp-config) via the resume option. This flag can define a stdio MCP server, leading to arbitrary command execution outside the SDK's permission controls when untrusted input is passed as a session ID.

Detection Guidance

Check installed versions of Claude Agent SDK with pip show claude-agent-sdk. If version is below 0.2.121, the system is vulnerable. Inspect application logs for unexpected CLI flags like --mcp-config during session resumption.

Impact Analysis

If you use the affected SDK version and pass untrusted input as a session ID, an attacker could execute arbitrary commands on your system. This could lead to unauthorized access, data theft, or system compromise depending on the attacker's goals.

Compliance Impact

This vulnerability allows arbitrary command execution via untrusted input in the session ID, bypassing SDK permission controls. This could lead to unauthorized data access, modification, or exfiltration, violating GDPR data integrity and confidentiality principles and HIPAA security rule requirements for access controls and integrity.

Mitigation Strategies

Upgrade Claude Agent SDK to version 0.2.121 or later immediately. Review and sanitize all session ID inputs to prevent command injection. Monitor for suspicious CLI flag usage in logs.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-96620. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart