Summary
FoundDream miniclawd's SkillsLoader component is vulnerable to command injection when the requires.bins argument is manipulated before being passed to underlying system commands.
A remote attacker who can influence this argument may execute arbitrary commands on the host, leading to full compromise of the affected service under certain deployment conditions.
Affected context
The issue appears in the SkillsLoader implementation, specifically in /src/application/skills-loader.ts, where the requires.bins argument is used to construct or invoke operating system commands.
It becomes relevant in deployments where:
- User-controlled or remotely sourced data can influence
requires.bins - The application dynamically loads or verifies external binaries as part of its "skills" functionality
- The runtime environment allows spawned commands with the privileges of the miniclawd process
Because miniclawd uses a rolling release model, the vulnerable behavior may exist across multiple builds unless explicitly corrected.
Exploit preconditions
- Attack surface: Network-exposed application interfaces (e.g., HTTP APIs, remote skill registration, or configuration endpoints) that affect the
SkillsLoaderand itsrequires.binsparameter. - Required access: Ability to supply or modify data that the application passes into
requires.bins(such as skill definitions, configuration data, or plugin metadata). - Trigger point: Invocation of the SkillsLoader code path that processes
requires.binsand constructs or executes a system command (e.g., when loading or validating a skill). - Why exploitation is possible: The code likely interpolates
requires.binsdirectly into a shell command or command-line string without proper escaping, validation, or use of parameterized APIs, enabling an attacker-controlled string to alter command structure.
Why this happens
This vulnerability stems from constructing system commands using untrusted input and then executing them through shell-aware APIs.
Mapping to CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') and closely related CWE-74: Improper Neutralization of Special Elements in Output Used by a Downstream Component, the bug pattern is:
- Treating input associated with
requires.binsas benign text rather than potentially hostile data. - Concatenating or interpolating this value directly into command strings.
- Relying on the shell or operating system to interpret the combined string, which permits metacharacters to break out of the intended command context and introduce additional commands or arguments.
At an abstract level, any code path that takes external data, constructs a command via string operations, and passes it to a shell execution API without strict neutralization or whitelisting is susceptible to this class of issue.
Potential impact
- Execution of arbitrary system commands with the privileges of the miniclawd process
- Reading, modifying, or deleting data accessible to the application user account
- Pivoting to other internal services or resources reachable from the compromised host
- Installing backdoors or persistence mechanisms on the affected system
- Disruption of service availability through destructive or resource-exhausting commands
General mitigation guidance
Effective mitigation usually involves removing direct string-based command construction and minimizing trust in external inputs:
- Prefer APIs that avoid shell interpretation (e.g., spawn commands using argument arrays rather than shell-joined strings) and do not involve
/bin/shunless strictly necessary. - Treat any field like
requires.binsas untrusted input; apply strict allowlists of permitted commands or binary names and reject anything outside a known-safe set. - Normalize and validate values at the earliest boundary (e.g., when a "skill" or configuration is registered), rather than just before command execution.
- Run the miniclawd service with least-privilege accounts and constrained OS-level permissions so that, even if a command is injected, its impact is limited.
- Consider sandboxing or containerization controls (e.g., restricted namespaces, seccomp, or similar) to reduce what spawned processes can access.
How teams detect issues like this
Detection generally combines code-centric and behavior-centric approaches:
- Static analysis: Configure rules to flag use of shell execution primitives (such as
child_process.exec,execSync, or similar abstractions in TypeScript/JavaScript) when they involve string concatenation of external data, especially variables associated with configuration fields likerequires.bins. - Code review: During manual reviews, scrutinize any logic that:
- Builds command strings using template literals or concatenation
- Accepts remote configuration for executable paths or command fragments
- Passes user-supplied values into shell or CLI calls without clear validation and allowlisting
- Automated policies: Integrate linting rules and security-focused CI checks that prevent merging code with unvalidated command construction patterns.
- Runtime monitoring: Observe application logs and system telemetry for anomalous command invocations or unexpected child processes originating from the miniclawd service.

