Severity:

HIGH RISK

(7.3)

Command Injection in MiroFish Inter-Process Communication

CVE-2026-7058

Deferred

Vulnerability type

Category:

Command Injection

CWE:

CWE-74, CWE-77

Impact:

Remote Code Execution via Command Injection

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

MiroFish up to version 0.1.2 contains a command injection vulnerability in the SimulationIPCClient.send_command function within the inter-process communication (IPC) service.

When attacker-controlled data is incorporated into OS-level commands without proper sanitization or argument separation, a remote attacker can execute arbitrary commands on the affected system.

Affected context

This vulnerability appears in the inter-process communication layer of MiroFish, specifically in backend/app/services/simulation_ipc.py within the SimulationIPCClient.send_command function.

It manifests when user-provided or remotely supplied values are concatenated into shell commands or passed to command execution APIs in a way that allows shell metacharacters or additional arguments to be interpreted by the operating system.

Deployments that expose the IPC-triggering functionality over a network or indirectly through higher-level features are more at risk, especially when inputs are not strictly validated and commands run with elevated privileges.

Exploit preconditions

  • Attack surface: Remote, via any interface or API that ultimately invokes SimulationIPCClient.send_command with data influenced by an attacker.
  • Required access: Ability to send crafted requests or messages to the IPC client or any upstream component that passes attacker-controlled data into the IPC layer.
  • Trigger point: Execution of a shell or subprocess command built from untrusted input inside send_command.
  • Why exploitation is possible: The command string is likely constructed by concatenating or interpolating raw input into a shell command, and then executed via an API that invokes a shell or interprets metacharacters, enabling injection of additional commands or arguments.

Why this happens

The underlying issue is improper construction of OS commands using untrusted data, mapping directly to CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection') and related to CWE-74: Improper Neutralization of Special Elements in Output.

Instead of treating user-controlled values as data-only parameters to a subprocess API, the IPC client appears to build a command line string that the shell parses, allowing characters such as ;, &&, |, or backticks to alter the command structure.

This pattern turns configuration or user input into executable logic, granting attackers influence over what the operating system runs whenever the IPC mechanism is triggered.

Potential impact

  • Remote execution of arbitrary OS commands with the privileges of the MiroFish process
  • Reading, modifying, or deleting application and system files accessible to the process
  • Pivoting to other internal services or hosts reachable from the affected system
  • Disruption or manipulation of simulation processes managed through the IPC layer
  • Installation of malware or backdoors to maintain persistent access

General mitigation guidance

Effective mitigation focuses on treating all incoming data as untrusted and preventing it from altering command structure:

  • Use subprocess APIs that accept argument arrays (e.g., exec-style or list-based invocation) and avoid passing untrusted data through a shell.
  • Strictly validate and whitelist allowable command options or arguments, rejecting any values that fall outside a narrowly defined set.
  • Avoid constructing command strings with concatenation or interpolation; if commands must be built dynamically, separate control data from user data and escape or encode special characters appropriately.
  • Run IPC-handling components with least privilege, minimizing filesystem and network access so that any compromise is contained.
  • Consider alternative designs where IPC messages encode actions and parameters that are handled directly in code, rather than mapped to shell commands.

How teams detect issues like this

Detection typically combines code-centric and behavioral approaches:

  • Static analysis: Flag usage of shell-invoking APIs (e.g., those that accept a single command string or shell=True) when they receive variables derived from external input, especially in IPC-related modules.
  • Code review cues: Look for string concatenation or formatting used to build command lines, and trace data flow from network or IPC inputs into execution points in simulation_ipc.py.
  • Policy enforcement: Enforce development guidelines that prohibit shell-based command execution in IPC paths without strict sanitization and argument separation.
  • Runtime monitoring: Use host-based intrusion detection or logging to spot unusual subprocess invocations, anomalous command patterns, or unexpected child processes spawned by the MiroFish service.

Sources

SourceLink
github.comgithub.com/666ghj/MiroFish/
github.comgithub.com/666ghj/MiroFish/issues/488
vuldb.comvuldb.com/submit/798603
vuldb.comvuldb.com/vuln/359631
vuldb.comvuldb.com/vuln/359631/cti

Frequently asked

questions

Yes. The description indicates that the attack can be launched remotely when an attacker can send data that flows into SimulationIPCClient.send_command, such as through an exposed API or network-driven IPC pathway.

The attacker needs the ability to interact with the component or service that triggers the IPC call, typically by sending crafted requests or messages. No local system account is required if the IPC entry point is reachable over the network.

Refactor the IPC command execution so that it does not pass concatenated strings to a shell. Use parameterized subprocess calls (argument arrays, no shell), strict whitelisting of commands and arguments, and avoid interpreting raw input as part of the command structure.

Establish coding standards that disallow shell-based command construction with untrusted input, adopt security-focused code review and static analysis for IPC and process-spawning code, and favor designs where incoming messages drive internal function calls rather than external shell commands.

Find out what's already
exploitable in your codebase.