# CVE-2026-47392: PraisonAI vulnerable to sandbox escape via `print.__self__` builtins module leak in `execute_code` (subprocess mode)

- Severity: Critical 9.9 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.60%, higher than 50% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-05-29T22:30:13.000Z
- Modified: 2026-07-21T18:59:43.940Z
- Also known as: GHSA-4mr5-g6f9-cfrh, PYSEC-2026-463, PYSEC-2026-483
- Weaknesses: CWE-184, CWE-693
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

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

(As written by CVE List.)

## Affected

- MervinPraison PraisonAI: < 4.6.40
- MervinPraison < 1.6.40: praisonaiagents
- praisonaiagents (PyPI): before 1.6.40
- praisonai (PyPI): before 4.6.40

## Every score

- GitHub_M: CVSS:3.1 9.9 Critical `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- GitHub: CVSS:3.1 9.9 Critical `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 9.9 Critical `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`

## References

- <https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-4mr5-g6f9-cfrh> (exploit, web)
- <https://github.com/MervinPraison/PraisonAI/pull/1684>
- <https://github.com/MervinPraison/PraisonAI/commit/b0d8f777528f3253a0cfb0a3ef65455da6ae32f6>
- <https://github.com/MervinPraison/PraisonAI> (package)
- <https://pypi.org/project/praisonai> (package)
- <https://github.com/advisories/GHSA-4mr5-g6f9-cfrh> (advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-47392> (advisory)
- <https://pypi.org/project/praisonaiagents> (package)

## Sources

- CVE List: [CVE-2026-47392](https://www.cve.org/CVERecord?id=CVE-2026-47392), CVE Terms of Use, modified 2026-07-21
- GitHub Advisory Database: [GHSA-4mr5-g6f9-cfrh](https://github.com/advisories/GHSA-4mr5-g6f9-cfrh), CC-BY-4.0, modified 2026-06-29
- NVD: [CVE-2026-47392](https://nvd.nist.gov/vuln/detail/CVE-2026-47392), Public domain, modified 2026-07-21
- PyPA Advisory Database: [PYSEC-2026-463](https://osv.dev/vulnerability/PYSEC-2026-463), CC-BY-4.0, modified 2026-07-13
- PyPA Advisory Database: [PYSEC-2026-483](https://osv.dev/vulnerability/PYSEC-2026-483), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-47392 · Whole record: https://cve.day/CVE-2026-47392.json · Rebuilt by cve.day 2026-11-25T22:59:29.349Z
