You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unauthenticated RCE in DocsGPT MCP STDIO Configuration
Critical
dartpain
published
GHSA-gcrq-f296-2j74Apr 28, 2026
Package
arc53/DocsGPT
Affected versions
>= 0.15.0, < 0.16.0
Patched versions
0.16.0
Description
Summary
An attacker accessing both the official DocsGPT website (https://app.docsgpt.cloud/) or any local and public deployment, can craft a malicious payload bypassing the "MCP test" behavior to achieve arbitrary remote code execution (RCE).
Details
Inside application/agents/tools/mcp_tool.py you import StdioTransport from FastMCP, which is used inside the _create_transport function, if an MCP connection would be sent to the server with "stdio" as the MCP type, that MCP configuration will tell the server to run an arbitrary command with arguments inside the command variable.
When a user wants to add a new MCP server from the web client, he has only one options which is the "http" based MCP server.
The server checks only if the user passed a valid MCP server as a value in the "server_url" parameter, but the client can change other values such as "transport_type", so after the business logic passes the "server_url" check and sees that its valid, it will continue to read the "transport_type" - and run the commands given for that specific "transport_type". This means that if an attacker passes "transport_type"="stdio" with a command, he can trigger the server to run that command even though this logic is not explicitly exposed to the user.
Original sent data when testing the MCP server
Malicious payload crafted to bypass the logic
Inside application/agents/tools/mcp_tool.py you explicitly check for a given "server_url" value, but if that value is supplied alongside a different "transport_type" than "http", "sse", "auto", the client could make the server's logic to return a valid non-http based MCP configuration.
def test_connection(self) -> Dict:
"""
Test the connection to the MCP server and validate functionality.
Returns:
Dictionary with connection test results including tool count
"""
if not self.server_url:
return {
"success": False,
"message": "No MCP server URL configured",
"tools_count": 0,
"transport_type": self.transport_type,
"auth_type": self.auth_type,
"error_type": "ConfigurationError",
}
if not self._client:
self._setup_client()
try:
if self.auth_type == "oauth":
return self._test_oauth_connection()
else:
return self._test_regular_connection()
except Exception as e:
return {
"success": False,
"message": f"Connection failed: {str(e)}",
"tools_count": 0,
"transport_type": self.transport_type,
"auth_type": self.auth_type,
"error_type": type(e).__name__,
}
PoC
Find the DocsGPT backend server port or URL
Run the malicious payload containing the malformed JSON triggering the stdio command execution
You can edit the command to run any arbitrary command, enabling the attacker to run reverse shell, data exfiltration or any other command.
POC Video
docsgpt_rce_disclosure_video.mp4
You can use the following code to reproduce this issue.
This is an unauthenticated remote code execution vulnerability (RCE) allowing attackers full control over the DocsGPT services. affecting the official DocsGPT cloud instance and any publicly available DocsGPT instance, and local instances when in the same network as the attacker (Lateral Movement).
CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
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.
Learn more on MITRE.
Summary
An attacker accessing both the official DocsGPT website (https://app.docsgpt.cloud/) or any local and public deployment, can craft a malicious payload bypassing the "MCP test" behavior to achieve arbitrary remote code execution (RCE).
Details
Inside application/agents/tools/mcp_tool.py you import StdioTransport from FastMCP, which is used inside the _create_transport function, if an MCP connection would be sent to the server with "stdio" as the MCP type, that MCP configuration will tell the server to run an arbitrary command with arguments inside the command variable.
When a user wants to add a new MCP server from the web client, he has only one options which is the "http" based MCP server.

The server checks only if the user passed a valid MCP server as a value in the "server_url" parameter, but the client can change other values such as "transport_type", so after the business logic passes the "server_url" check and sees that its valid, it will continue to read the "transport_type" - and run the commands given for that specific "transport_type". This means that if an attacker passes "transport_type"="stdio" with a command, he can trigger the server to run that command even though this logic is not explicitly exposed to the user.
Original sent data when testing the MCP server

Malicious payload crafted to bypass the logic

Inside application/agents/tools/mcp_tool.py you explicitly check for a given "server_url" value, but if that value is supplied alongside a different "transport_type" than "http", "sse", "auto", the client could make the server's logic to return a valid non-http based MCP configuration.
PoC
POC Video
docsgpt_rce_disclosure_video.mp4
You can use the following code to reproduce this issue.
Impact
This is an unauthenticated remote code execution vulnerability (RCE) allowing attackers full control over the DocsGPT services. affecting the official DocsGPT cloud instance and any publicly available DocsGPT instance, and local instances when in the same network as the attacker (Lateral Movement).
CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')
Reference
https://www.ox.security/blog/the-mother-of-all-ai-supply-chains-critical-systemic-vulnerability-at-the-core-of-the-mcp/
https://www.ox.security/blog/mcp-supply-chain-advisory-rce-vulnerabilities-across-the-ai-ecosystem/