Arbitrary Code Execution Risk in PraisonAI Prior to Version 4.5.128
CVE-2026-40158
8.6HIGH
What is CVE-2026-40158?
PraisonAI, a multi-agent teams system, has a notable vulnerability where its AST-based Python sandbox could be bypassed, allowing execution of arbitrary code when untrusted agent code is run. Specifically, the vulnerability stems from the _execute_code_direct function that inadequately filters access to potentially dangerous Python attributes by utilizing a static analysis of the AST. Certain attributes are inadvertently exempted from scrutiny, enabling attackers to exploit this weakness. The issue has been resolved in version 4.5.128, reinforcing the security measures to prevent such dynamic attribute resolution issues.
Affected Version(s)
PraisonAI < 4.5.128
