codex-tmux
Fail
Audited by Gen Agent Trust Hub on Apr 10, 2026
Risk Level: HIGHCOMMAND_EXECUTION
Full Analysis
- [COMMAND_EXECUTION]: The
scripts/run.pyscript contains a command injection vulnerability in the_build_tmux_wrapperfunction. Several variables derived from user-controlled input, such asprefix,session_name, andsignal_channel, are interpolated into a generated Bash script template using double quotes (e.g.,PREFIX="{prefix}") without proper shell escaping (such asshlex.quote). An attacker can execute arbitrary commands by providing a payload like$(id)to the--prefixargument. - [COMMAND_EXECUTION]: A secondary injection vulnerability exists within the generated Bash script's use of
osascript. TheNOTIFY_MSGvariable incorporates the user-controlledprefixand is not sanitized before being used in anosascriptcommand line, potentially allowing for AppleScript-based injection. - [COMMAND_EXECUTION]: The skill relies on the practice of dynamically generating and executing temporary shell scripts. Because user-controlled input is incorporated into these scripts without using security best practices for all fields, it creates a high-severity security risk.
- [COMMAND_EXECUTION]: The skill uses
subprocess.runto interact with system tools liketmuxandbash. While these interactions are part of the skill's core functionality, the identified injection vulnerability allows these tools to be misused for unauthorized actions. - [COMMAND_EXECUTION]: (Indirect Prompt Injection Surface) The skill ingests untrusted data via the
--taskargument and possesses capabilities including shell command execution and file system access. 1. Ingestion points:--taskparameter inscripts/run.py. 2. Boundary markers: None. 3. Capability inventory: Execution oftmuxandbashviasubprocess.run; writing to/tmp/codex-tmux. 4. Sanitization: Task content is handled via file writes and quoted subshells, which prevents direct shell injection but fails to sanitize the content for downstream processing.
Recommendations
- AI detected serious security threats
Audit Metadata