Skip to main content

Python CVE-2026-34935

CRITICAL
OS Command Injection (CWE-78)
2026-04-01 https://github.com/MervinPraison/PraisonAI GHSA-9gm9-c8mq-vq7m
9.8
CVSS 3.1 · GitHub Advisory
Share

Severity by source

GitHub Advisory PRIMARY
9.8 CRITICAL
AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Primary rating from GitHub Advisory · only source for this CVE.

CVSS VectorGitHub Advisory

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

4
PoC Detected
Apr 07, 2026 - 13:20 vuln.today
Public exploit code
Analysis Generated
Apr 02, 2026 - 00:15 vuln.today
Patch released
Apr 02, 2026 - 00:15 nvd
Patch available
CVE Published
Apr 01, 2026 - 23:20 nvd
CRITICAL 9.8

DescriptionGitHub Advisory

Summary

The --mcp CLI argument is passed directly to shlex.split() and forwarded through the call chain to anyio.open_process() with no validation, allowlist check, or sanitization at any hop, allowing arbitrary OS command execution as the process user.

Details

cli/features/mcp.py:61 (source) -> praisonaiagents/mcp/mcp.py:345 (hop) -> mcp/client/stdio/__init__.py:253 (sink)

python
# source
parts = shlex.split(command)
# hop
cmd, args, env = self.parse_mcp_command(command, env_vars)
self.server_params = StdioServerParameters(command=cmd, args=arguments)
# sink
process = await anyio.open_process([command, *args])

Fixed in commit 47bff65413beaa3c21bf633c1fae4e684348368c (v4.5.69) by introducing a command allowlist:

python
ALLOWED_COMMANDS = {"npx", "uvx", "node", "python"}
if cmd not in ALLOWED_COMMANDS:
    raise ValueError(f"Disallowed command: {cmd}")

PoC

python
# tested on: praisonai==4.5.48
# install: pip install praisonai==4.5.48
# run: praisonai --mcp "bash -c 'id > /tmp/pwned'"
# verify: cat /tmp/pwned
# expected output: uid=1000(...) gid=1000(...) groups=1000(...)

Impact

Any deployment where the --mcp argument is influenced by untrusted input is exposed to full OS command execution as the process user. No authentication is required.

AnalysisAI

Arbitrary OS command execution in PraisonAI (Python package) versions prior to 4.5.69 allows remote unauthenticated attackers to execute commands as the process user via the unsanitized --mcp CLI argument. The vulnerability stems from passing user-controlled input directly to shlex.split() and anyio.open_process() without validation. CVSS 9.8 (Critical). Vendor-released patch available in version 4.5.69 (commit 47bff65). No public exploit code independently confirmed beyond the GitHub advisory PoC, and not listed in CISA KEV at time of analysis.

Technical ContextAI

PraisonAI is a Python-based AI agent framework distributed via PyPI. The vulnerability exists in the Model Context Protocol (MCP) integration path spanning three modules: cli/features/mcp.py (entry point), praisonaiagents/mcp/mcp.py (parameter forwarding), and mcp/client/stdio/__init__.py (process execution sink). The --mcp argument accepts a command string intended for launching MCP server processes. The implementation uses shlex.split() to tokenize the command, but critically fails to validate the resulting command name or arguments before passing them to anyio.open_process(), a wrapper around subprocess execution. This creates a classic command injection vulnerability (CWE-78) where shell metacharacters and arbitrary commands can be injected. The attack surface is any deployment where the CLI is exposed to untrusted input sources, including web APIs wrapping the CLI, containerized services, or scheduled tasks processing external data. The affected package identifier is pkg:pip/praisonai, impacting all versions before the 4.5.69 security release.

RemediationAI

Immediately upgrade to PraisonAI version 4.5.69 or later, which introduces command allowlist validation restricting --mcp to approved executables (npx, uvx, node, python) as implemented in commit 47bff65413beaa3c21bf633c1fae4e684348368c. Verify the fix is present by checking that ALLOWED_COMMANDS validation exists in praisonaiagents/mcp/mcp.py. For environments unable to upgrade immediately, implement defense-in-depth controls: remove or disable the --mcp CLI argument if MCP integration is not required, restrict CLI execution to trusted administrators only, run PraisonAI processes under least-privilege user accounts with no shell access, deploy in isolated containers with restricted process execution capabilities (seccomp/AppArmor profiles blocking exec syscalls), and implement input validation at the application layer before any CLI invocation. Review logs for suspicious --mcp usage patterns including shell metacharacters (backticks, semicolons, pipes) or unexpected command names. Patch deployment advisory and commit details at https://github.com/MervinPraison/PraisonAI/commit/47bff65413beaa3c21bf633c1fae4e684348368c.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2026-55255 HIGH POC
8.4 Jun 19

Cross-user flow execution in Langflow (< 1.9.1) lets any authenticated API-key holder run another user's flow by passing

Share

CVE-2026-34935 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy