Skip to content
CriticalVulnerability

GHSA-4mr5-g6f9-cfrh: PraisonAI vulnerable to sandbox escape via `print.__self__` builtins module leak in `execute_code` (subprocess mode)

Published
Record updated
View JSON
Affected
  • PraisonAI <= 4.6.39, fixed in 4.6.40
  • praisonaiagents <= 1.6.39, fixed in 1.6.40
Known exploitation
Not listed in the CISA Known Exploited Vulnerabilities catalog at the last check.
EPSS
0.9%

Summary

PraisonAI's `execute_code()` in `praisonaiagents/tools/python_tools.py` (v1.6.37, subprocess sandbox mode) can be fully bypassed. Using `print.__self__` to reach the real `builtins` module, then `vars()` and runtime string construction to obtain `__import__`, lets an attacker run arbitrary OS commands on the host, defeating the sandbox. The bypass survives patches for CVE-2026-39888, CVE-2026-34938 and CVE-2026-40158, and the advisory rates it CVSS 9.9 Critical.

Mitigation

The source does not state a fix yet. Check the original advisory for updates.