Python
CVE-2026-34935
CRITICAL
Severity by source
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
Lifecycle Timeline
4DescriptionGitHub 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)
# 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:
ALLOWED_COMMANDS = {"npx", "uvx", "node", "python"}
if cmd not in ALLOWED_COMMANDS:
raise ValueError(f"Disallowed command: {cmd}")PoC
# 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.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
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
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
Cross-user flow execution in Langflow (< 1.9.1) lets any authenticated API-key holder run another user's flow by passing
Same weakness CWE-78 – OS Command Injection
View allSame technique Command Injection
View allShare
External POC / Exploit Code
Leaving vuln.today
GHSA-9gm9-c8mq-vq7m