agent-sandbox
Fail
Audited by Gen Agent Trust Hub on Sep 17, 2026
Risk Level: HIGHCOMMAND_EXECUTIONPRIVILEGE_ESCALATIONDYNAMIC_EXECUTION
Full Analysis
- [COMMAND_EXECUTION]: The
DockerSandbox.exec()method contains a critical shell injection vulnerability. The logic intended to escape single quotes (command.replace(/'/g, "'\\''")) fails when the resulting string is wrapped in single quotes for a host-levelexecSynccall. This allows an attacker to terminate the argument string and execute arbitrary commands on the host machine. - [COMMAND_EXECUTION]: The
DockerSandbox.start()method is vulnerable to host-level command injection. It directly interpolates configuration properties such asworkDir,image, andallowedEnvVarsinto the shell command string passed toexecSyncwithout sanitization or escaping. - [PRIVILEGE_ESCALATION]: The sandbox escape vulnerability in
DockerSandboxallows an agent restricted to a container to execute commands with the privileges of the host user, representing a significant privilege escalation risk. - [COMMAND_EXECUTION]: The
AgentSandboximplementation uses a fragile, keyword-based blocklist for command filtering. This is a poor security practice that is easily bypassed by shell metacharacters, subshells, or encoded inputs. - [DYNAMIC_EXECUTION]: The skill makes heavy use of
execSyncto run arbitrary strings as shell commands. While intended for sandboxing, the lack of robust input validation in the provided templates poses a direct risk if an AI agent populates these commands with unvalidated user input.
Recommendations
- AI detected serious security threats
Audit Metadata