Codex2Shell: Pre-AI Remote Code Execution in OpenAI Codex Desktop

Satoki Tsuji

Satoki Tsuji

Ikotas Labs


Abstract

AI coding agents such as Claude Code, Cursor, and OpenAI Codex have rapidly become part of the daily developer workflow, yet their security model is still treated as an extension of the editors and CLIs they are built on. This talk presents Agent2Shell: 13 previously undisclosed vulnerabilities, found entirely by manual analysis of shipping binaries, that achieve arbitrary code execution across these three agents.

The defining property of these issues is that the AI model is never invoked. Code execution is reached the moment a victim opens a repository, double-clicks a .code-workspace file, or runs an ordinary shell command with output redirection. By the time the agent begins to respond, calc.exe is already running. The talk groups the findings into three escalating tiers by required interaction: 0-click (open a folder, a double-click, a piped command), 1-click (approving a deliberately faint trust dialog, pressing F5, opening a terminal with Ctrl+`), and 1-prompt (the agent itself carries the attack to completion when asked to do something as benign as "show me recent changes").

Each finding is shown end-to-end with a live demonstration and grounded in the actual decompiled code path, including concrete cases such as a Cursor built-in extension that fails to inherit the CVE-2023-36742 fsmonitor mitigation, a Claude Desktop App that hardcodes allowDangerouslySkipPermissions while omitting strictMcpConfig, a non-TTY stdout that silently disables Claude Code's trust dialog, blacklist-style fixes for CVE-2026-33068 that are trivially sidestepped with dontAsk + Bash(*), and git's coarse "read" classification that turns textconv into RCE during a routine code review. The talk closes with three structural trust-boundary failures common to all 13 issues, mapping each agent's design decision to the initial-access primitive it creates.

All findings have been responsibly disclosed to the respective vendors, and the public release is being coordinated with them. This research has not been presented or published anywhere prior to POC.

Speaker Info

Satoki Tsuji

Satoki Tsuji is a security engineer working across web security, AI security, and physical red teaming, and the CEO of Ikotas Labs, Inc. He is a member of a top Japanese CTF team and competed in the DEF CON CTF Finals. He has manually discovered and reported vulnerabilities in Google Play, Chromium, Firefox, and others.

Organizer

Organizer Logo

Partner Company

Partner Company Logo