CVE-2026-6118
Received Received - Intake
Remote Command Injection in AstrBot MCP Endpoint (add_mcp_server

Publication date: 2026-04-12

Last updated on: 2026-04-29

Assigner: VulDB

Description
A vulnerability was determined in AstrBotDevs AstrBot up to 4.22.1. Impacted is the function add_mcp_server of the file astrbot/dashboard/routes/tools.py of the component MCP Endpoint. This manipulation of the argument command causes command injection. The attack is possible to be carried out remotely. The exploit has been publicly disclosed and may be utilized. The project was informed of the problem early through an issue report but has not responded yet.
CVSS Scores
EPSS Scores
Probability:
Percentile:
Meta Information
Published
2026-04-12
Last Modified
2026-04-29
Generated
2026-05-07
AI Q&A
2026-04-12
EPSS Evaluated
2026-05-05
NVD
EUVD
Affected Vendors & Products
Showing 1 associated CPE
Vendor Product Version / Range
astrbotdevs astrbot to 4.22.1 (inc)
Helpful Resources
Exploitability
CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-77 The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component.
CWE-74 The product constructs all or part of a command, data structure, or record using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify how it is parsed or interpreted when it is sent to a downstream component.
Attack-Flow Graph
AI Powered Q&A
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:

This vulnerability allows authenticated attackers to execute arbitrary system commands on the server running AstrBot, potentially leading to data exfiltration, unauthorized access, and lateral movement within the network.

Such unauthorized command execution and potential data breaches can negatively impact compliance with common standards and regulations like GDPR and HIPAA, which require protection of sensitive data and secure system operations.

Specifically, the risk of data exfiltration and unauthorized access could lead to violations of data privacy and security requirements mandated by these regulations.


Can you explain this vulnerability to me?

CVE-2026-6118 is a vulnerability in AstrBot versions up to 4.22.1 that allows arbitrary command execution through the MCP server configuration management functionality.

The flaw exists because the MCP server configuration accepts user-supplied fields such as 'command' and 'args' without any validation or restriction. These inputs are passed directly to a subprocess execution call during the MCP connection test.

An attacker with authenticated dashboard access can send a specially crafted request containing malicious commands, which the server executes immediately with the privileges of the AstrBot process.

This means the attacker can run arbitrary system commands remotely, potentially compromising the server.


How can this vulnerability impact me? :

This vulnerability allows attackers to execute any system command on the affected server with the same privileges as the AstrBot process.

  • Attackers can exfiltrate sensitive data.
  • They can install reverse shell backdoors to maintain persistent access.
  • It enables lateral movement within the network, potentially compromising other systems.

Although exploitation requires authenticated dashboard access, this can be combined with other vulnerabilities such as default credentials to facilitate attacks.


How can this vulnerability be detected on my network or system? Can you suggest some commands?

This vulnerability can be detected by checking for the presence of the file /tmp/mcp_rce_marker.txt which is created as a proof of concept by executing a malicious command through the MCP server configuration.

A detection method involves sending an authenticated POST request to the endpoint /api/tools/mcp/add with a payload containing a command that writes a unique marker file on the server.

For example, a command like the following can be used to test for exploitation:

  • POST /api/tools/mcp/add with JSON body {"command": "/bin/sh", "args": ["-c", "echo MCP_RCE_POC > /tmp/mcp_rce_marker.txt"]}

After sending this request, check if the file /tmp/mcp_rce_marker.txt exists on the server and contains the string MCP_RCE_POC.


What immediate steps should I take to mitigate this vulnerability?

Immediate mitigation steps include implementing an allowlist of permitted MCP server executables to restrict which commands can be run.

  • Allow only specific executables such as npx, uvx, node, python, and python3.

Additionally, validate and sanitize all command-line arguments to reject shell metacharacters that could enable command injection.

Separate the configuration saving process from the connection testing to avoid executing commands during configuration changes.

Add confirmation dialogs with security warnings when adding MCP servers to alert users of potential risks.

Log all MCP configuration changes with user attribution for auditability and to detect suspicious activity.


Ask Our AI Assistant
Need more information? Ask your question to get an AI reply (Powered by our expertise)
0/70
EPSS Chart