/

CVE-2026-30625

Severity:

CRITICAL RISK

(9.8)

OS Command Injection in Upsonic

CVE-2026-30625

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-77

Impact:

Remote Code Execution

Severity:

CRITICAL RISK

(9.8)

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

Upsonic 0.71.6 contains an OS command execution issue in its MCP server task creation feature, where user-defined tasks can invoke certain allowed commands (such as npm and npx) with dangerous argument flags.

By crafting malicious MCP tasks, an attacker can leverage these commands to execute arbitrary operating system commands with the privileges of the Upsonic process.

Affected context

This vulnerability affects Upsonic deployments that expose the MCP server/task creation functionality to users or integrations capable of defining tasks.

The risk arises when:

  • MCP tasks are allowed to specify arbitrary command and args values,
  • An allowlist permits commands like npm and npx,
  • Those commands are invoked in a way that accepts flags or arguments which can spawn arbitrary subprocesses or execute shell commands.

Environments where Upsonic runs with elevated OS privileges or on shared infrastructure face increased impact if this behavior is exploited.

Exploit preconditions

  • Attack surface: MCP server/task creation interface (e.g., HTTP API, UI, or integration using MCP).
  • Required access: Ability to create or modify MCP tasks that define command and args.
  • Trigger point: Execution of the crafted MCP task by Upsonic's MCP server.
  • Why exploitation is possible: The allowlist focuses on executable names but does not sufficiently constrain how those executables are used. Commands such as npm and npx inherently support flags and package scripts that can execute arbitrary OS commands, allowing attackers to bypass the intended restriction and gain code execution.

Why this happens

The underlying bug stems from relying on a coarse-grained command allowlist while still permitting untrusted users to fully control command-line arguments and task definitions.

This maps to CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection'), because:

  • User-controlled task configuration is treated as trusted input to process execution logic.
  • Allowed binaries (npm, npx) serve as indirect shells, where arguments can invoke arbitrary scripts or commands.
  • There is no robust enforcement of a safe subset of operations or isolation boundary between user-defined tasks and the host environment.

Conceptually, this is an authorization and command construction flaw: the system assumes that permitting specific binaries is safe, without accounting for those binaries' ability to execute arbitrary code via their normal features.

Potential impact

  • Execution of arbitrary OS commands with the privileges of the Upsonic process.
  • Reading, modifying, or deleting files accessible to the Upsonic service account.
  • Installing additional tools or backdoors on the host system.
  • Pivoting to other network services reachable from the Upsonic host.
  • Compromise of application data, configuration, or secrets stored on the same machine.
  • Full host compromise if Upsonic runs with high privileges or on shared infrastructure.

General mitigation guidance

Effective mitigation focuses on restricting what user-defined tasks can execute and applying strong isolation where execution is required:

  • Replace broad command allowlists with tightly scoped, parameterized operations (e.g., predefined task types rather than arbitrary command/args).
  • Disallow or heavily restrict commands whose primary behavior includes executing arbitrary scripts or subprocesses (such as generic package managers and shells).
  • Validate and normalize all task parameters, rejecting arguments that enable script execution, dynamic evaluation, or arbitrary subprocess spawning.
  • Run task execution in strongly isolated sandboxes (containers, jails, or dedicated low-privilege users) with minimal filesystem and network access.
  • Apply least-privilege principles to the Upsonic process itself so that, if code execution occurs, its ability to affect the system is limited.
  • Provide clear warnings in administrative interfaces about the execution capabilities of MCP tasks and their security implications.

How teams detect issues like this

To detect and monitor for this class of issue, organizations can:

  • Use static analysis or configuration scanning to find code paths where user-controlled task definitions are passed to process execution APIs (e.g., child processes, subprocess libraries) without strict argument constraints.
  • Add logging around MCP task creation and execution, including the full command and args, and alert on suspicious patterns (e.g., unexpected flags, shell metacharacters, or high-risk scripts).
  • Implement runtime monitoring for unusual process trees spawned by the Upsonic service (e.g., shells, interpreters, or package managers running in atypical ways).
  • Conduct security-focused code reviews with explicit checklists for command execution logic, ensuring the review covers how allowlists are enforced and how arguments are constrained.
  • Integrate automated policy enforcement in CI/CD pipelines that flags new features involving external command execution or expansion of allowed commands.

Sources

SourceLink
github.comgithub.com/Upsonic/Upsonic/commit/855053fce0662227d9246268ff4a0844b481a305
ox.securityox.security/blog/mcp-supply-chain-advisory-rce-vulnerabilities-across-the-ai-ecosystem/

Frequently asked

questions

Yes, if the MCP task creation interface is exposed to remote users or integrated services, an attacker who can create or modify tasks may exploit this issue without local access to the host.

The attacker must be able to define or alter MCP tasks, including controlling the command and args fields. This could be through authenticated access, misconfigured permissions, or compromised integrations.

Replace arbitrary command execution with constrained, predefined operations. Instead of allowing users to freely choose commands and arguments, expose a limited set of task types with fixed executables and tightly validated parameters, and run them in an isolated execution environment.

Treat any feature that executes external commands as high risk: avoid passing user-controlled values directly to process execution APIs, restrict available operations to the minimal necessary subset, isolate execution contexts, and include specific checks for command injection risk in design reviews, code reviews, and automated security testing.

Find out what's already
exploitable in your codebase.