Back to skill

Security audit

Cmd Executor

Security checks for vulnerabilities and agentic risk

Overview

This skill openly acts as a local command runner, but it gives chat input unrestricted shell access without clear safety controls.

Only install this if you explicitly want a skill that can run arbitrary local shell commands with the permissions of the hosting process. Use it only in a tightly sandboxed, least-privileged environment and avoid exposing it to untrusted prompts, shared chats, secrets, or important local files.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Error
Location
skill.js:4
Finding

Unrestricted Message-to-Shell Command Execution

Content
View full analysis
{ exec(cmd, { maxBuffer: 1024 * 1024 }, (err, stdout, stderr) => { if (err) reject(`${stdout}${stderr}`); else resolve(stdout + stderr); }); }); return out.trim(); ``` The related trigger configuration is: ```yaml pattern: "^Run command:\s*.*" ``` ### Technical Analysis The skill obtains attacker-controlled text from `context.message`, removes an optional `Run command:` prefix, and passes the remaining content directly to Node.js `child_process.exec()`. `exec()` invokes a system shell, so the input is interpreted as shell syntax rather than as a fixed executable and safely separated argument list. There is no command allowlist, argument validation, authorization check, confirmation step, sandbox, execution timeout, or privilege restriction. Shell operators, command chaining, redirection, and other shell-specific constructs are consequently available to the requester. The prefix removal does not provide a security boundary. Although `task.yml` is configured to trigger on messages beginning with `Run command:`, the implementation itself does not require that prefix to be present. If the exported function can be invoked through another route, the entire message may still be executed. The skill also returns combined standard output and standard error to the requester. Commands that read sensitive local information can therefore expose that information through the normal skill response. ### Attack Path 1. An attacker or unauthorized user gains the ability to submit a me ...[truncated 1703 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (4)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill takes chat-controlled input from context.message, converts it directly into a shell command, and executes it with child_process.exec. This enables arbitrary command execution on the host, allowing an attacker to run OS commands, read or modify files, install persistence, exfiltrate secrets, or pivot to other systems; the lack of any constrained purpose or allowlist makes the risk especially severe.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill executes shell commands without any user-facing warning, consent flow, or disclosure that chat input will be interpreted as an OS command. This increases the likelihood of unsafe use and social-engineering abuse, because users or downstream agents may provide input believing it is normal text while it is actually being executed on the system.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The skill explicitly offers to run any Windows command locally based on user input, which enables arbitrary command execution on the host system. Without strict allowlisting, confirmation prompts, sandboxing, or clear warnings about system-impacting behavior, a user or prompt injection could trigger destructive commands, data exfiltration, malware download/execution, or persistence changes.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger pattern ^Run command:\s*.* is extremely broad and appears to allow arbitrary natural-language requests to invoke a shell-command execution skill with no visible scoping, allowlist, or safety constraints. In the context of a skill explicitly described as executing local shell commands, this broad matcher materially increases the chance that untrusted user input can be routed into dangerous command execution behavior, potentially leading to full local code execution or destructive system actions.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.dangerous_exec

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
skill.js:10