Severity:

HIGH RISK

(7.3)

OS Command Injection in FoundDream miniclawd

CVE-2026-9452

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-77, CWE-78

Impact:

Remote Code Execution

Severity:

HIGH RISK

(7.3)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

FoundDream miniclawd contains an OS command injection vulnerability in the ExecTool.execute function, where externally influenced input is passed into system-level command execution.

When an attacker can control or tamper with the arguments passed to this function over a remote interface, they may execute arbitrary commands on the underlying operating system.

Affected context

The vulnerability appears in the /src/tools/exec.ts module, specifically in ExecTool.execute, where shell or process commands are constructed and invoked.

It becomes relevant in deployments where:

  • ExecTool.execute is reachable via network-exposed APIs or other remotely invocable paths
  • User-provided or untrusted data influences command strings or arguments
  • There is no strict validation, sanitization, or whitelisting of allowed commands or parameters

Because the project does not use versioning, any instance up to commit 2d65665046e2222eeea76cafc8570ed546a8c125 may be affected unless locally patched.

Exploit preconditions

  • Attack surface: Network-accessible functionality that indirectly or directly calls ExecTool.execute
  • Required access: Ability to trigger the vulnerable code path with attacker-controlled input (e.g., API calls, web requests, task configuration)
  • Trigger point: Execution of OS-level commands using input that is embedded into a shell command or passed unsafely to a process launcher
  • Why exploitation is possible: The implementation likely concatenates or interpolates input into command strings, or passes it to a shell, without proper neutralization or strict whitelisting, allowing injection of additional commands or options

Why this happens

This issue stems from improper neutralization of special elements used in OS commands, aligning with CWE-78 (OS Command Injection) and related patterns in CWE-77 (Command Injection).

At a high level, the code path in ExecTool.execute treats user-controlled or untrusted input as part of a command line, either by string concatenation, template expansion, or passing the data directly to a shell interpreter.

Without constraining what can be executed—such as using fixed command paths, argument whitelisting, or non-shell process spawning—an attacker can craft input that alters the intended command, injects additional commands, or changes arguments in a way that executes arbitrary OS-level actions.

Potential impact

  • Remote execution of arbitrary commands under the privileges of the miniclawd process
  • Unauthorized access to files, including reading or modifying application data
  • Lateral movement within the host environment or connected systems, depending on configuration
  • Service disruption through process termination, resource exhaustion, or destructive commands
  • Potential escalation of impact if combined with misconfigurations, weak credentials, or excessive process privileges

General mitigation guidance

Effective mitigation generally focuses on removing or tightly constraining the use of shell interpreters for dynamic input:

  • Prefer APIs that launch processes without a shell and pass arguments as structured arrays rather than concatenated strings
  • Enforce strict allowlists for executable commands and permissible arguments, rejecting anything unexpected
  • Normalize and validate all external input before it can influence command execution, reducing reliance on blacklisting patterns
  • Isolate components that must execute system commands using least privilege, containerization, or sandboxing to limit blast radius
  • Centralize command execution utilities so security checks and safe patterns are consistently applied

How teams detect issues like this

Detection can combine code-level and operational techniques:

  • Static analysis rules to flag patterns like shell invocation functions with interpolated or concatenated variables (e.g., exec-style APIs, shell: true options)
  • Code review checklists that explicitly ask reviewers to identify any place where external input reaches OS command execution
  • Logging and monitoring of executed commands, focusing on anomalous arguments, unexpected utilities, or user-controlled parameters
  • Automated policy enforcement in CI that blocks merges when unsafe command-construction patterns are detected in TypeScript/JavaScript tooling code
  • Periodic security assessments or red-team tests that attempt to influence command-execution utilities via exposed APIs

Sources

SourceLink
github.comgithub.com/FoundDream/miniclawd/
github.comgithub.com/FoundDream/miniclawd/issues/1
vuldb.comvuldb.com/submit/813767
vuldb.comvuldb.com/vuln/365433
vuldb.comvuldb.com/vuln/365433/cti

Frequently asked

questions

Exploitability depends on how widely ExecTool.execute is exposed. If it is reachable via public or semi-public network interfaces with controllable parameters, the vulnerability can be exploited remotely. If only internal or trusted components invoke it with fixed arguments, practical risk may be lower.

An attacker must be able to reach a code path that triggers ExecTool.execute with data they control. This typically means access to an HTTP API, RPC mechanism, task configuration, or similar interface that ultimately influences the command and its arguments.

The safest approach is to remove reliance on shell-based execution for untrusted input and instead use structured process execution APIs with fixed commands and strictly validated arguments. Where dynamic behavior is needed, adopt allowlists and normalization rather than building command strings directly.

Establish secure coding guidelines that prohibit direct interpolation of user input into command lines, enforce static analysis checks for exec-like APIs, and require design reviews whenever new tooling needs to interact with the OS. Combining these with principle-of-least-privilege deployments and robust input validation significantly reduces the likelihood of command injection bugs.

Find out what's already
exploitable in your codebase.