/

CVE-2026-54149

Severity:

HIGH RISK

(8.8)

OS Command Injection (CWE-78) via MCP Tools in MaxKB

CVE-2026-54149

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78

Impact:

Remote Code Execution by Authenticated Users

Severity:

HIGH RISK

(8.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

In MaxKB, insufficient validation of MCP transport types allows authenticated users to import tool definitions that embed stdio transports with malicious system commands.

When these tools are triggered through an AI Chat node, the MultiServerMCPClient may execute arbitrary commands on the host, turning trusted tool integration into a remote execution vector.

Affected context

This vulnerability occurs in MaxKB deployments that:

  • Allow users to import .tool files into the platform
  • Use MCP referencing mode within AI chat pipelines
  • Rely on MultiServerMCPClient for tool execution over different transports

It becomes relevant when tool import and MCP configuration steps do not strictly constrain or verify the allowed MCP transport types, particularly stdio-based transports that can run arbitrary system commands.

Exploit preconditions

  • Attack surface: MaxKB web interface and API where .tool files are imported and AI chat flows are configured
  • Required access: Authenticated user account with permission to import tools or configure AI Chat nodes that reference MCP tools
  • Trigger point: Execution of an AI Chat node that references the imported tool, causing MultiServerMCPClient to activate the stdio transport and run the associated command
  • Why exploitation is possible: The tool import serializer and MCP referencing logic do not consistently validate or restrict the MCP transport type, allowing attacker-controlled stdio configurations to be treated as trusted tool definitions and executed by the system client

Why this happens

The core issue is a failure to enforce strict validation and sanitization of command-capable transport configurations when importing and referencing MCP tools.

Specifically, the MaxKB tool serializer and chat pipeline step logic accept .tool definitions that specify stdio transports without checking whether the embedded commands are safe or permitted.

This maps to CWE-78: Improper Neutralization of Special Elements used in an OS Command, because attacker-controlled configuration is effectively passed to an execution environment (MultiServerMCPClient) without limiting what commands can be invoked or how arguments are constructed.

Potential impact

  • Authenticated users may execute arbitrary OS commands on the MaxKB host
  • Attackers could read, modify, or delete application and system data accessible to the MaxKB process
  • Compromise of the MaxKB instance, including access to credentials, configuration files, and connected services
  • Use of the compromised host as a pivot point for broader lateral movement within the enterprise network
  • Disruption of AI assistant functionality through destructive or resource-exhausting commands

General mitigation guidance

Effective mitigation focuses on reducing the trust placed in tool configuration files and constraining how MCP transports operate:

  • Apply strict allowlists for supported MCP transport types and reject any configuration that attempts to use command-capable transports (such as unrestricted stdio) in untrusted contexts
  • Introduce schema-level validation for .tool files so that command strings, arguments, and transport settings are treated as untrusted data and verified against security policies
  • Enforce clear separation between configuration data and execution primitives, ensuring that tool definitions cannot directly define raw system commands without an intermediate, validated abstraction
  • Run MultiServerMCPClient and related components with least-privilege OS accounts and restricted filesystem and network access, so that even if a command is mis-executed the blast radius is limited
  • Prefer sandboxed or containerized execution environments for tools that interact with the operating system to reduce the impact of misconfigurations or unexpected command behavior

How teams detect issues like this

Organizations can detect and manage similar issues by:

  • Reviewing code paths that transform configuration files (such as .tool definitions) into executable commands, with particular attention to MCP transport handling and any stdio-based execution
  • Using static analysis or linters to flag patterns where user-provided configuration is passed into process-spawning APIs, shell invocation wrappers, or transport constructors without validation
  • Implementing configuration review and approval workflows for newly imported tools, focusing on transport types, command fields, and any execution-related metadata
  • Monitoring runtime logs and audit trails for unusual tool imports, unexpected MCP transport usage, or commands executed via MultiServerMCPClient that deviate from known workflows
  • Applying policy-based enforcement (for example, security gateways or admission controllers) that block high-risk transport types or command patterns from being loaded into production environments

Sources

SourceLink
github.comgithub.com/1Panel-dev/MaxKB/releases/tag/v2.10.0-lts
github.comgithub.com/1Panel-dev/MaxKB/security/advisories/GHSA-4pr3-9xhm-98x5

Frequently asked

questions

Exploitation is typically performed over the network through MaxKB's web interface or APIs, but it requires a valid authenticated session with sufficient rights to import tools or configure chat pipelines.

Not necessarily. Any user role that can import .tool files and link them to an AI Chat node could potentially exploit the issue, depending on how permissions are configured in a specific deployment.

The safest strategy is to ensure configuration files cannot directly specify arbitrary OS commands.

This means validating MCP transport types against an allowlist, treating all configuration as untrusted input, and routing command execution through constrained, well-defined interfaces rather than raw system calls.

Future designs should separate configuration from execution logic, apply strict validation and normalization before any configuration reaches a command-execution path, and enforce least-privilege execution environments.

Incorporating security-focused code review and automated checks for command injection patterns around transport and tool handling logic can help prevent regressions.

Find out what's already
exploitable in your codebase.