---
id: CVE-2026-96620
title: >-
  Claude Agent SDK: Argument Injection via resume Option Allows Arbitrary
  Command Execution
summary: >-
  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
  injec…
severity: critical
cvss: 9.2
cvssVector: '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'
cvssSource: cna
cwe:
  - CWE-20
  - CWE-78
  - CWE-88
vendor: anthropics
product: claude-agent-sdk-python
affected:
  - claude-agent-sdk-python < 0.2.121
ssvc:
  exploitation: none
  automatable: 'yes'
  technicalImpact: total
  timestamp: '2026-10-21T21:28:15.538686Z'
published: '2026-10-16'
updated: '2026-10-21'
sourceUpdated: '2026-10-21T21:28:24.631Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2026-96620'
references:
  - url: >-
      https://github.com/anthropics/claude-agent-sdk-python/security/advisories/GHSA-h4mw-j7qp-8mwm
    label: >-
      https://github.com/anthropics/claude-agent-sdk-python/security/advisories/GHSA-h4mw-j7qp-8mwm
  - url: 'https://github.com/anthropics/claude-agent-sdk-python/pull/1123'
    label: 'https://github.com/anthropics/claude-agent-sdk-python/pull/1123'
  - url: >-
      https://github.com/anthropics/claude-agent-sdk-python/commit/347a1cb88d7652199399db1b7f914e0a459a6662
    label: >-
      https://github.com/anthropics/claude-agent-sdk-python/commit/347a1cb88d7652199399db1b7f914e0a459a6662
  - url: >-
      https://github.com/anthropics/claude-agent-sdk-python/releases/tag/v0.2.121
    label: >-
      https://github.com/anthropics/claude-agent-sdk-python/releases/tag/v0.2.121
  - url: 'https://github.com/anthropics/claude-agent-sdk-python'
  - url: 'https://github.com/advisories/GHSA-h4mw-j7qp-8mwm'
tags:
  - cve.org
  - osv
  - pip
  - ghsa
epss: 0.00705
epssPercentile: 0.53162
aliases:
  - GHSA-h4mw-j7qp-8mwm
ecosystem: pip
patched:
  - claude-agent-sdk 0.2.121
ingestedAt: '2026-10-16T19:46:24.281Z'
---

## Overview

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.

## Affected

- `claude-agent-sdk-python < 0.2.121`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Package advisory (CVE-2026-96620)

Affected packages:

- `claude-agent-sdk < 0.2.121`

Patched in:

- `claude-agent-sdk 0.2.121`

Source: https://osv.dev/vulnerability/GHSA-h4mw-j7qp-8mwm
