PT-2026-31995 · Praisonai · Praisonai
Published
2026-04-10
·
Updated
2026-06-01
·
CVE-2026-40158
CVSS v3.1
8.6
High
| Vector | AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H |
Name of the Vulnerable Software and Affected Versions
PraisonAI versions prior to 4.5.128
Description
PraisonAI's AST-based Python sandbox can be bypassed using the
type. getattribute trampoline, leading to arbitrary code execution when running untrusted agent code. The execute code direct function in praisonaiagents/tools/python tools.py uses AST filtering to block dangerous Python attributes, but the filter only checks ast.Attribute nodes. This allows a bypass because the sandbox does not account for dynamic attribute resolution via methods such as type.getattribute, resulting in incomplete enforcement of security restrictions. The string ' subclasses ' is an ast.Constant, not an ast.Attribute, so it is never checked against the blocked list.Recommendations
Update to version 4.5.128 or later.
Fix
Code Injection
Protection Mechanism Failure
Found an issue in the description? Have something to add? Feel free to write us 👾
Related Identifiers
Affected Products
Praisonai