Severity:

HIGH RISK

(7.3)

OS Command Injection in ChatboxAI Model Context Protocol

CVE-2026-6130

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-77, CWE-78

Impact:

Remote Code Execution via OS 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

ChatboxAI Chatbox up to version 1.20.0 contains an OS command injection vulnerability in the StdioClientTransport implementation of the Model Context Protocol Server Management System.

By manipulating the args or env parameters used to spawn processes, a remote attacker may execute arbitrary system commands on the underlying host.

Affected context

The vulnerability resides in the Model Context Protocol (MCP) Server Management System, specifically within the StdioClientTransport logic in src/main/mcp/ipc-stdio-transport.ts.

It affects deployments where the application constructs and launches OS-level processes based on external input (such as configuration, protocol messages, or remote requests) and passes user-controllable data into args or env variables.

The risk is heightened when those parameters are not strictly validated or are passed through shell-interpreted contexts, allowing injected tokens to be interpreted as commands or modifiers.

Exploit preconditions

  • Attack surface: Network-accessible interfaces that can influence the MCP Server Management System, including any API, protocol channel, or configuration pathway that feeds into StdioClientTransport.
  • Required access: Remote ability to control or significantly influence the args and/or env values used when launching the target process (for example, through request parameters, remote configuration, or protocol fields).
  • Trigger point: The vulnerable code path is executed when the application starts or manages a process via StdioClientTransport, using the attacker-influenced args/env to configure the spawned process.
  • Why exploitation is possible: The implementation passes attacker-controllable values into command execution without robust sanitization, strict argument building, or elimination of shell interpretation, enabling injected content to alter command behavior or introduce new commands.

Why this happens

This issue stems from constructing OS process invocations using data that can be influenced by an external actor and not treating that data as untrusted.

Insecure handling of args or environment variables (env) allows attacker-supplied input to reach command execution APIs (e.g., spawn/exec variants) in a form that the operating system or shell interprets as additional commands or control characters.

This aligns with CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') and is closely related to CWE-77: Improper Neutralization of Special Elements used in a Command ('Command Injection'), because input is not constrained to safe, expected tokens before being used in a privileged execution context.

Potential impact

  • Remote execution of arbitrary system commands with the privileges of the ChatboxAI process
  • Reading, modifying, or deleting local files accessible to the application
  • Pivoting to other internal services or hosts reachable from the compromised system
  • Installing backdoors, cryptocurrency miners, or other persistent malware
  • Exfiltration of sensitive information such as configuration secrets, API keys, or user data
  • Service disruption or denial-of-service by terminating critical processes or exhausting system resources

General mitigation guidance

Effective mitigation focuses on removing the ability for untrusted data to influence command structure and on reducing the damage if a command is compromised:

  • Prefer safe APIs that avoid shell parsing entirely (e.g., use exec/spawn variants that accept an executable path and a fixed array of arguments rather than concatenated command strings).
  • Enforce strict validation and whitelisting of any data that can affect args or env, allowing only known-safe values, formats, or enumerated options.
  • Treat configuration and protocol parameters that may reach command execution as untrusted by default, applying canonicalization and rejecting unexpected tokens or metacharacters.
  • Limit the command surface by avoiding dynamic construction of executables or arguments; instead, map user choices to predefined command templates with fixed structure.
  • Run the ChatboxAI process and any spawned MCP servers with least privilege, using dedicated low-privilege accounts and constrained file-system and network permissions.
  • Consider defense-in-depth mechanisms such as OS-level sandboxing, containerization, or AppArmor/SELinux profiles to constrain the effect of any potential command compromise.

How teams detect issues like this

Organizations can look for this class of vulnerability using a combination of static, dynamic, and process-level monitoring:

  • Static analysis: Configure analyzers or linters to flag use of process-spawning APIs (e.g., child_process.spawn, exec, or equivalents) where arguments or environment variables are derived from request data, configuration files, or other untrusted sources without validation.
  • Code review signals: During manual review, pay attention to all code paths that:
  • Build command strings or argument arrays from variables influenced by external input.
  • Populate env objects from user or protocol data.
  • Bypass or weaken validation with constructs like direct concatenation, string interpolation, or "escape" helpers of unknown correctness.
  • Policy enforcement: Introduce repository or CI policies that require:
  • Justification and documentation for any new OS command execution paths.
  • Use of centrally reviewed helper utilities for spawning processes safely.
  • Runtime monitoring: Use logging and host-based security tools to detect unusual child processes, unexpected arguments, or anomalous environment values launched by the ChatboxAI process.

Sources

SourceLink
github.comgithub.com/chatboxai/chatbox/
github.comgithub.com/chatboxai/chatbox/issues/3627
github.comgithub.com/chatboxai/chatbox/issues/3627#issue-4193060116
vuldb.comvuldb.com/submit/795355
vuldb.comvuldb.com/vuln/356993
vuldb.comvuldb.com/vuln/356993/cti

Frequently asked

questions

Yes. The description indicates that the attack can be launched remotely, as long as an attacker can influence the args or env parameters that flow into the StdioClientTransport process creation logic.

An attacker needs logical access to any interface that affects how the MCP Server Management System launches processes—this might be an API endpoint, protocol interaction, or configuration mechanism that ultimately controls args or env. Direct shell access is not required.

The most robust approach is to eliminate shell interpretation by using process-spawning APIs that accept a fixed executable path and a strongly-typed argument list, combined with strict whitelisting and validation of all values that can reach args or env. Any dynamic command construction should be replaced with controlled mappings from user actions to pre-defined, safe command configurations.

Treat any data that may influence OS commands as untrusted, adopt a security guideline that prohibits ad-hoc command building, and centralize process-launch logic in well-reviewed utility functions. Combine that with automated static analysis rules, mandatory security-focused code review for process creation code, and least-privilege runtime configurations so that command injection opportunities are both harder to introduce and less impactful if they occur.

Find out what's already
exploitable in your codebase.