CVE-2026-47392

PraisonAI vulnerable to sandbox escape via `print.__self__` builtins module leak in `execute_code` (subprocess mode)

Published Jul 21, 2026 CVSS 3.1 · 9.9 Critical EPSS < 1% KEV · Not listed
Description
PraisonAI is a multi-agent teams system. Prior to version 4.6.40 of PraisonAI, corresponding to version 1.6.40 of praisonaiagents, `execute_code()` in `praisonaiagents/tools/python_tools.py` (v1.6.37, subprocess sandbox mode) can be fully bypassed using `print.__self__` to retrieve the real Python `builtins` module, from which `__import__` can be extracted via `vars()` and runtime string construction. This achieves arbitrary OS command execution on the host, completely defeating the sandbox. This is a novel bypass that survives all patches for CVE-2026-39888 (frame traversal), CVE-2026-34938 (str subclass), and CVE-2026-40158 (`type.__getattribute__` trampoline). PraisonAI version 4.6.40 and praisonaiagents version 1.6.40 contain an updated fix.

Analysis

AI-generated

Technical impact

PraisonAI is a multi‑agent teams system. Before version 4.6.40 (and praisonaiagents 1.6.40), its execute_code() function in python_tools.py (subprocess sandbox mode) can be entirely bypassed by leaking the true Python builtins module with print.__self__. An attacker can then extract __import__ via vars() and use runtime string construction to execute arbitrary OS commands, defeating the sandbox. This novel bypass survives all previous CVE patches (CVE-2026-39888, CVE-2026-34938, CVE-2026-40158). The flaw thus represents a severe command‑injection (CWE‑184) and protection‑mechanism‑failure (CWE‑693) vulnerability that allows full host OS command execution.

Affected Systems

MervinPraison’s PraisonAI products prior to version 4.6.40 (pre‑release) and the praisonaiagents module before 1.6.40 are affected. The fix was introduced in PraisonAI 4.6.40 and praisonaiagents 1.6.40, so any deployment using older releases remains vulnerable.

Risk and Exploitability

The CVSS score of 9.9 indicates critical severity. The EPSS score of <1% shows exploitation probability is very low, and the vulnerability is not listed in the CISA KEV catalog. The attack likely requires invoking execute_code() with malicious payload, implying a local or compromised‑access vector. Because the bypass uses print.__self__ to leak builtins and survive previous patchwork, an attacker who gains execution can run arbitrary OS commands on the host, making this a high‑priority risk that also touches CWE‑184 and CWE‑693.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade PraisonAI to version 4.6.40 or newer and praisonaiagents to 1.6.40 or newer, which resolves the command injection flaw (CWE‑184) and the protection mechanism failure (CWE‑693).
  • Restrict use of execute_code() to trusted inputs, implement strict access controls, and validate inputs to guard against command injection (CWE‑184).
  • Run PraisonAI with the least privilege necessary; even if the sandbox is bypassed, the process must have limited permissions, mitigating the protection mechanism vulnerability (CWE‑693).
  • Consider running PraisonAI inside a tightly controlled container or virtual machine to contain any host compromises, addressing possible exploitation paths stemming from the CWE‑184 flaw.

Generated by OpenCVE AI on July 30, 2026 at 17:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-4mr5-g6f9-cfrh PraisonAI vulnerable to sandbox escape via `print.__self__` builtins module leak in `execute_code` (subprocess mode)
History
Type Values Removed Values Added
First Time appeared Mervinpraison
Mervinpraison < 1.6.40
Mervinpraison praisonai
Vendors & Products Mervinpraison
Mervinpraison < 1.6.40
Mervinpraison praisonai
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description PraisonAI is a multi-agent teams system. Prior to version 4.6.40 of PraisonAI, corresponding to version 1.6.40 of praisonaiagents, `execute_code()` in `praisonaiagents/tools/python_tools.py` (v1.6.37, subprocess sandbox mode) can be fully bypassed using `print.__self__` to retrieve the real Python `builtins` module, from which `__import__` can be extracted via `vars()` and runtime string construction. This achieves arbitrary OS command execution on the host, completely defeating the sandbox. This is a novel bypass that survives all patches for CVE-2026-39888 (frame traversal), CVE-2026-34938 (str subclass), and CVE-2026-40158 (`type.__getattribute__` trampoline). PraisonAI version 4.6.40 and praisonaiagents version 1.6.40 contain an updated fix.
Title PraisonAI vulnerable to sandbox escape via `print.__self__` builtins module leak in `execute_code` (subprocess mode)
Weaknesses CWE-184
CWE-693
References
Metrics cvssV3_1

{'score': 9.9, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H'}

Weaknesses
  • CWE-184

    Incomplete List of Disallowed Inputs

  • CWE-693

    Protection Mechanism Failure

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 21, 2026, 4:39 PM
Reserved
May 19, 2026, 7:22 PM
Status
Deferred
Published
Jul 21, 2026, 4:17 PM
Modified
Jul 21, 2026, 6:59 PM