/

CVE-2026-57124

Severity:

CRITICAL RISK

(9.8)

OS Command Injection (CWE-78) in PraisonAI UI Host

CVE-2026-57124

Deferred

Vulnerability type

Category:

OS Command Injection

CWE:

CWE-78, CWE-306

Impact:

Unauthenticated Remote Code Execution

Severity:

CRITICAL RISK

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

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/connect endpoint
  • 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.

Sources

SourceLink
github.comgithub.com/MervinPraison/PraisonAI/commit/2adfe7e8323f6deec66925cf15a885b6238895e9
github.comgithub.com/MervinPraison/PraisonAI/releases/tag/v4.6.59
github.comgithub.com/MervinPraison/PraisonAI/security/advisories/GHSA-p75f-6fp4-p57w

Frequently asked

questions

Yes. A client that can reach the exposed UI endpoint may be able to trigger local command execution without authenticating, depending on deployment network controls.

No host account is necessarily required. Network access to the unauthenticated endpoint can be sufficient, while commands execute under the UI service account.

Require authentication and authorization before allowing MCP connections, restrict process-launching operations to an explicit allowlist, and prevent caller input from selecting arbitrary commands.

Treat process execution as a privileged operation, bind administrative interfaces narrowly, enforce endpoint authentication through policy, and monitor services for unexpected child-process creation.

Find out what's already
exploitable in your codebase.