PraisonAI vulnerable to sandbox escape via `print.__self__` builtins module leak in `execute_code` (subprocess mode)
Key facts
- Attack vector
- Network
- Privileges required
- Low
- User interaction
- None
- Attack complexity
- Low
- Impact type
- Security bypass
- Confidentiality · integrity · availability
- High · High · High
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CNA. Fix status from CNA and GitHub. Impact type from CWE-693.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- Poc
- Automatable
- No
- Technical impact
- Total
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| MervinPraison | PraisonAI | before 4.6.40 | 4.6.40 | Patch available | CNA |
| MervinPraison | < 1.6.40 | praisonaiagents | — | No fix listed | CNA |
| — | praisonaiagents (PyPI) | before 1.6.40 | 1.6.40 | Patch available | GHSA-4mr5-g6f9-cfrh |
| — | PraisonAI (PyPI) | before 4.6.40 | 4.6.40 | Patch available | GHSA-4mr5-g6f9-cfrh |
- PraisonAI VendorMervinPraison Affected before 4.6.40 Fixed in 4.6.40 Patch available CNA
- < 1.6.40 VendorMervinPraison Affected praisonaiagents Fixed in — No fix listed CNA
- praisonaiagents (PyPI) Vendor— Affected before 1.6.40 Fixed in 1.6.40 Patch available GHSA-4mr5-g6f9-cfrh
- PraisonAI (PyPI) Vendor— Affected before 4.6.40 Fixed in 4.6.40 Patch available GHSA-4mr5-g6f9-cfrh
CPE names Threatist (inferred) · 1
Inferred from how NVD named this product before; not given by a source.
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:praison:praisonai:*:*:*:*:*:*:*:* | — | — | MervinPraison |
- cpe:2.3:a:praison:praisonai:*:*:*:*:*:*:*:* Versions — — ·MervinPraison
Remediation
- Fix · CNA PraisonAI (MervinPraison) Fixed in 4.6.40
- Fix · GHSA-4mr5-g6f9-cfrh praisonaiagents (PyPI) Fixed in 1.6.40 Advisory →
- Fix · GHSA-4mr5-g6f9-cfrh PraisonAI (PyPI) Fixed in 4.6.40 Advisory →
Timeline
- 2026-10-02 Threatist record created from CVE-2026-47392
- 2026-10-03 Alias added: GHSA-4mr5-g6f9-cfrh
References
More MervinPraison vulnerabilities
- TI-2026-79619 Missing authentication in PraisonAI AgentOS exposes agent chat CVSS 3.1CRITICAL 9.8
- TI-2026-71236 Missing access control in PraisonAI AgentTeam exposes agent endpoints CVSS 3.1CRITICAL 9.8
- TI-2026-44052 PraisonAI before 1.6.78 Remote Code Execution via CodeAgent CVSS 4.0CRITICAL 10.0
- TI-2026-41123 praisonai-platform 0.1.4 still boots on the hardcoded JWT secret dev-secret-change-me (default-open production guard) CVSS 3.1CRITICAL 9.8
- TI-2026-41122 praisonai-platform: default JWT signing secret 'dev-secret-change-me' enables token forgery CVSS 3.1CRITICAL 9.8
- TI-2026-41118 PraisonAI MCPServer exposes unauthenticated HTTP tools/call CVSS 3.1CRITICAL 9.8
Sources
- CVE-2026-47392 · CVE Program
- CVE-2026-47392 · NVD
- FIRST EPSS
- GHSA-4mr5-g6f9-cfrh · GitHub Advisory Database · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences