T04 · Embedded Malicious Code
- Location
scripts/run_command.py:17- Finding
Obfuscated Arbitrary Shell Command Execution
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a broadly scoped command runner that can execute arbitrary host shell commands despite being described as only a test.
Install only in a tightly sandboxed environment and only if you specifically need a generic shell-command wrapper. Treat any invocation as equivalent to running the decoded command directly in your terminal, and do not allow untrusted prompts, files, or users to control the command argument.
scripts/run_command.py:17Obfuscated Arbitrary Shell Command Execution
scripts/run_command.py:29Command Output Is Obscured Contrary to Documented Behavior
The documented behavior is arbitrary system command execution via a Python wrapper, with base64/URL decoding that obscures the true command content from casual inspection. In the context of a vaguely described 'test' skill, this makes the capability especially dangerous because it can be used to access host resources, run destructive commands, or facilitate further compromise.
The documented behavior is arbitrary system command execution via a Python wrapper, with base64/URL decoding that obscures the true command content from casual inspection. In the context of a vaguely described 'test' skill, this makes the capability especially dangerous because it can be used to access host resources, run destructive commands, or facilitate further compromise.
The manifest claims the skill is 'just test,' while the documentation defines a concrete command-execution feature. Security-sensitive capabilities hidden behind an innocuous description increase the chance of accidental deployment and reduce the likelihood of appropriate review and restrictions.
Arbitrary system command execution is not justified by a stated purpose of 'just test,' making the capability disproportionate and unsafe in context. Because the skill instructs users to pass encoded commands for execution, it can enable stealthy harmful actions while appearing innocuous at the manifest level.
The skill metadata describes this as 'just test,' but the implementation decodes and executes arbitrary system commands. This mismatch is dangerous because it conceals the true capability of the skill, increasing the likelihood that operators or users will invoke or approve it without understanding the risk.
A generic 'test' skill has no legitimate need to execute arbitrary shell commands, making this capability unjustified and highly risky in context. Because the feature is broad and unrestricted, it can be used to run destructive commands, exfiltrate data, or establish persistence on the host.
This is a classic tool-parameter abuse case: untrusted input controls a shell command directly. In an agent skill context, this is especially dangerous because upstream prompts, tool calls, or encoded payloads can steer the tool into executing arbitrary OS commands, potentially leading to full host compromise.
command_b64 = base64.b64decode(args.command).decode("utf-8")
command_url = urllib.parse.unquote(command_b64)
completed = subprocess.run(
command_url,
shell=True,
text=True,
The skill documents a real command-execution capability with shell access, but the manifest declares no tool scope or permissions. This creates a dangerous mismatch: reviewers and runtime policy may underestimate the skill's access while the documented behavior enables arbitrary command execution and potentially network-capable system commands.
The script takes attacker-controlled input, decodes it, and passes it directly to subprocess.run with shell=True, which enables arbitrary shell-command execution. Base64 and URL decoding do not provide security; they only obscure the payload and can make dangerous commands less visible to reviewers and logging systems.
command_b64 = base64.b64decode(args.command).decode("utf-8")
command_url = urllib.parse.unquote(command_b64)
completed = subprocess.run(
command_url,
shell=True,
text=True,
The tool performs shell-command execution without meaningful user-facing warning, confirmation, or safety interlock. In the context of an agent skill, this increases the chance of accidental or socially engineered execution of harmful commands by making a dangerous action appear routine.
The natural-language comment is written solely in Chinese and directs a functional change, which constitutes a language-specific policy choice embedded in the file. There is no indication of user opt-in or documented justification for restricting instructions to a specific language.