codex-imagegen
Fail
Audited by Gen Agent Trust Hub on Aug 29, 2026
Risk Level: HIGHCOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTIONPRIVILEGE_ESCALATION
Full Analysis
- [COMMAND_EXECUTION]: The skill uses
subprocess.runin Python andbash -cin shell scripts to execute thecodexCLI tool. The Bash script variant is specifically vulnerable to command injection as it interpolates values from the input JSONL file directly into a shell command string:"... Prompt: $(jq -r .prompt <<<"$j"). ...". If thepromptfield in the input file contains backticks or subshell markers (e.g.,$(...)), those commands will be executed on the host system. - [PRIVILEGE_ESCALATION]: The skill explicitly uses the
--dangerously-bypass-approvals-and-sandboxflag withcodex exec. This flag is designed to disable security restrictions and automated approval prompts, significantly increasing the risk if the agent is manipulated into performing unintended actions. - [INDIRECT_PROMPT_INJECTION]: The skill processes external data from a file (
prompts.jsonl) and interpolates it directly into instructions for the agent. This creates a surface for indirect prompt injection attacks. - Ingestion points: The
prompts.jsonlfile serves as the primary entry point for untrusted data into the agent's context. - Boundary markers: There are no boundary markers or sanitization logic to separate the user-provided prompt from the system instructions.
- Capability inventory: The skill has the capability to execute shell commands via
subprocess.runand move files on the local filesystem usingshutil.move. - Sanitization: No validation or escaping is performed on the content of the
promptfield before it is used in the command execution flow. - [REMOTE_CODE_EXECUTION]: While the skill primarily executes a local CLI tool, the ability to inject commands through the input file (as noted in the Command Execution section) effectively allows for arbitrary code execution on the user's machine.
Recommendations
- AI detected serious security threats
Audit Metadata