{"id":"CVE-2026-96620","kind":"vulnerability","aliases":["CVE-2026-96620","GHSA-h4mw-j7qp-8mwm"],"related":[],"title":"Claude Agent SDK: Argument Injection via resume Option Allows Arbitrary Command Execution","description":"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.\n\nUsers are advised to update to the latest version of the claude-agent-sdk package.\n\nThank you to hackerone.com/moamenmahmood for reporting this issue.","summary":"The Claude Agent SDK for Python passed the resume option to the Claude CLI without validation, so a value starting with a dash was read as a CLI flag. An attacker who controls the resume session ID can inject an --mcp-config flag that starts an attacker-defined stdio MCP server, running arbitrary commands on the host.","severity":"critical","cvss":9.2,"epss":0.005779999773949385,"exploited":false,"exploited_at":null,"products":[{"name":"claude-agent-sdk","fixed":["0.2.121"],"affected":"< 0.2.121","ecosystem":"pypi"}],"ecosystems":["pypi"],"tags":["ai-agents","ai-tooling","claude-agent-sdk","cwe-20","cwe-78","cwe-88","mcp","python"],"not_affected_if":["default-config","no-untrusted-session-id","version-0.2.121-or-later"],"how_to_check":"pip show claude-agent-sdk (version below 0.2.121 is affected)\nFind code that passes user-supplied input as the resume or session ID argument to ClaudeAgentOptions or query","fix":"Upgrade claude-agent-sdk to 0.2.121 or later\nValidate or reject session IDs that begin with '-' until upgraded","status":"open","published_at":"2026-10-16T19:44:37+00:00","first_seen_at":"2026-10-23T19:11:32+00:00","triaged_at":"2026-10-23T20:56:43+00:00","updated_at":"2026-10-23T21:57:14+00:00","category":"ai-tooling","confidence":0.8,"triage":{"at":"2026-10-23T20:56:43Z","model":"claude-haiku-5-5","output":{"fix":"Upgrade claude-agent-sdk to 0.2.121 or later\nValidate or reject session IDs that begin with '-' until upgraded","reach":"unknown","impact":"high","summary":"The Claude Agent SDK for Python passed the resume option to the Claude CLI without validation, so a value starting with a dash was read as a CLI flag. An attacker who controls the resume session ID can inject an --mcp-config flag that starts an attacker-defined stdio MCP server, running arbitrary commands on the host.","category":"ai-tooling","who_cares":["python","claude-agent-sdk","mcp","ai-agents"],"confidence":0.8,"needs_auth":"unknown","worst_case":"Attacker runs arbitrary commands on the host running the agent.","analyst_note":"","how_to_check":"pip show claude-agent-sdk (version below 0.2.121 is affected)\nFind code that passes user-supplied input as the resume or session ID argument to ClaudeAgentOptions or query\nunknown","needs_analyst":false,"not_affected_if":["default-config","no-untrusted-session-id","version-0.2.121-or-later"],"user_interaction":"no","needs_special_setup":"yes","severity_if_unknown":"critical"},"cost_usd":0.000517,"input_tokens":2998,"output_tokens":435,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-20':39B '-2026':14A,22A '-78':41B '-88':43B '-96620':15A,23A '/moamenmahmood':203C '8mwm':20A 'advis':184C 'agent':2A,26A,30B,36B,48B,107C,195C 'ai':29B,32B 'ai-ag':28B 'ai-tool':31B 'allow':9A,121C 'applic':171C 'arbitrari':10A,100B,155C 'argument':4A 'attack':76B,94B,135C 'attacker-defin':93B 'begin':124C 'bypass':162C 'claud':1A,35B,47B,58B,106C,117C,194C 'claude':25A 'claude-agent-sdk':24A,34B,193C 'cli':59B,73B,118C,132C,159C 'command':11A,101B,156C 'config':88B,146C 'control':78B,137C,167C 'could':141C 'cve':13A,21A 'cwe':38B,40B,42B 'dash':68B 'defin':95B,148C 'execut':12A,157C 'exploit':168C 'flag':74B,89B,133C,147C 'ghsa':17A 'ghsa-h4mw-j7qp-8mwm':16A 'h4mw':18A 'hackerone.com':202C 'hackerone.com/moamenmahmood':201C 'host':104B 'id':82B,179C 'inject':5A,84B,142C 'input':175C 'interpret':128C 'issu':207C 'j7qp':19A 'latest':189C 'mcp':44B,87B,97B,145C,151C 'mcp-config':86B,144C 'option':8A,55B,114C 'packag':197C 'pass':52B,111C,173C 'permiss':166C 'python':45B,51B,110C 'read':70B 'report':205C 'requir':169C 'result':153C 'resum':7A,54B,80B,113C,139C,181C 'run':99B 'sdk':3A,27A,37B,49B,108C,164C,196C 'separ':131C 'server':98B,152C 'session':81B,178C 'start':65B,91B 'startup':160C 'stdio':96B,150C 'thank':198C 'tool':33B 'untrust':174C 'updat':186C 'user':182C 'valid':61B,120C 'valu':64B,123C,140C 'version':190C 'via':6A 'without':60B,119C","nicknames":[],"mitigations":[],"who_affected":null,"tier":null,"verified":{},"analyst_revisit_at":null,"first_public_at":"2026-10-16T19:44:37+00:00","kev":null,"cvss_vector":"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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-h4mw-j7qp-8mwm","url":"https://github.com/advisories/GHSA-h4mw-j7qp-8mwm","severity":"critical","published_at":"2026-10-16T19:44:37+00:00","modified_at":"2026-10-16T19:44:38+00:00","first_seen_at":"2026-10-23T19:11:32+00:00","fetched_at":"2026-10-23T19:11:32+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-96620","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-96620","severity":null,"published_at":"2026-10-16T20:18:28+00:00","modified_at":"2026-10-21T22:16:50+00:00","first_seen_at":"2026-10-23T21:57:14+00:00","fetched_at":"2026-10-23T22:28:55+00:00","note":null}],"documents":[],"notice":"Free to read at a human pace. An API with keys and an MCP server are in preparation; early access: hello@infrastack.ai"}