---
id: "CVE-2026-34935"
page: "https://infrastack.ai/live/CVE-2026-34935"
kind: "vulnerability"
aliases: ["CVE-2026-34935", "GHSA-9gm9-c8mq-vq7m"]
title: "PraisonAI: OS Command Injection in MCPHandler.parse_mcp_command()"
severity: "critical"
cvss: 9.8
epss: 0.00839
exploited: false
status: "open"
category: "ai-tooling"
products: [{"name": "praisonai", "fixed": ["4.5.69"], "affected": ">= 4.5.15, < 4.5.69", "ecosystem": "pypi"}, {"name": "praison praisonai", "fixed": ["4.5.69"], "affected": ">= 4.5.15, < 4.5.69", "ecosystem": "vendor"}]
ecosystems: ["pypi", "vendor"]
tags: ["ai-agents", "ai-tooling", "cwe-78", "mcp", "praisonai", "pypi", "python"]
not_affected_if: ["fixed-mcp-argument", "no-untrusted-input", "versions-outside-range"]
published_at: "2026-04-01T23:20:00+00:00"
first_seen_at: "2026-11-16T16:03:24+00:00"
updated_at: "2026-11-16T16:08:50+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-9gm9-c8mq-vq7m", "first_seen_at": "2026-11-16T16:03:24+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-34935", "first_seen_at": "2026-11-16T16:08:50+00:00"}]
exploit_sources: [{"type": "epss", "score": 0.00839, "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-34935"}]
---

# PraisonAI: OS Command Injection in MCPHandler.parse_mcp_command()

Link for people: https://infrastack.ai/live/CVE-2026-34935 (this .md is for agents)

PraisonAI passes the --mcp command-line argument straight into a process launcher with no validation, so anyone who can influence that argument can run arbitrary commands as the process user. No authentication is needed to trigger it.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:praisonai affected >= 4.5.15, < 4.5.69 fixed 4.5.69
- vendor:praison praisonai affected >= 4.5.15, < 4.5.69 fixed 4.5.69

## How to check

- Check the installed version with `pip show praisonai`; affected versions are `>= 4.5.15` and `< 4.5.69`.
- Search deployment scripts, service units and container commands for `praisonai --mcp` and see whether any part of that argument comes from user input or an external source.

## Fix

- Upgrade `praisonai` to `4.5.69` or later.

## Timeline

- 2026-11-16T16:03:24+00:00 ghsa https://github.com/advisories/GHSA-9gm9-c8mq-vq7m
- 2026-11-16T16:08:50+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-34935

## Documents

- [advisory] Maintainer's advisory: api.github.com https://api.github.com/repos/MervinPraison/PraisonAI/security-advisories/GHSA-9gm9-c8mq-vq7m
- [advisory] Maintainer's advisory: github.com https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-9gm9-c8mq-vq7m
- [fix] Patch: github.com https://github.com/MervinPraison/PraisonAI/commit/47bff65413beaa3c21bf633c1fae4e684348368c

## From the sources

### 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.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
