Summary
A critical command injection vulnerability in PraisonAI UI allows unauthenticated clients to submit caller-controlled commands and arguments to the local MCP process launcher. When the UI host is reachable over the network, an attacker may execute operating-system commands with the privileges of the UI service account, even if a later MCP handshake fails.
Affected context
The issue affects PraisonAI deployments before 4.6.59 that use the default UI host applications. Risk is increased when the UI command service binds to 0.0.0.0 and its MCP connection endpoint is reachable by untrusted clients without an authentication requirement. The vulnerable behavior occurs when caller-supplied command and argument values are passed to the local StdioMCPClient process-starting component.
Exploit preconditions
- Attack surface: The PraisonAI UI
POST /api/mcp/connectendpoint - Required access: Network reachability to the UI host; authentication is not mandatory by default
- Trigger point: Submission of a request that causes the UI to invoke the local MCP process launcher
- Why exploitation is possible: Caller-controlled command and argument values are accepted and used to start a local process, while the service may be exposed on all network interfaces
Why this happens
The vulnerability results from combining an unauthenticated command-launching endpoint with insufficient separation between request data and executable process parameters. User-controlled values reach a local process execution API without an effective authorization boundary or command restriction. This maps primarily to CWE-78: Improper Neutralization of Special Elements used in an OS Command, with CWE-306: Missing Authentication for Critical Function also describing the absent authentication control.
Potential impact
- An unauthenticated attacker may execute arbitrary operating-system commands
- Commands could run with the privileges of the PraisonAI UI service account
- The application host could be compromised
- Credentials, configuration, or other local data could be exposed
- The compromised service could be used for lateral movement or further attacks
General mitigation guidance
Mitigation generally focuses on removing unauthenticated access to process-launching functionality and preventing request data from selecting arbitrary executables or arguments.
Common defensive patterns include:
- Require strong authentication and authorization for MCP connection operations
- Bind administrative or process-control interfaces to trusted interfaces rather than all network interfaces
- Replace arbitrary command and argument handling with a strict allowlist of approved operations
- Avoid passing directly supplied values to shell or process execution APIs
- Run the UI service with the minimum filesystem, network, and operating-system privileges required
- Apply network segmentation and deny-by-default access controls around the UI host
How teams detect issues like this
Organizations can look for this vulnerability through:
- Static analysis rules identifying request values flowing into process, shell, or subprocess execution APIs
- Code review checks for unauthenticated endpoints that start local processes or invoke MCP clients
- API inventory and policy enforcement confirming authentication on administrative and execution-related routes
- Runtime monitoring for unexpected child processes, command-line arguments, or outbound connections from the UI service
- Network scans that identify UI services listening on all interfaces without access controls
Automated code review and software composition tools may help identify related command execution and missing-authentication patterns.

