PT-2026-31995 · Praisonai · Praisonai

CVE-2026-40158

·

Published

2026-04-10

·

Updated

2026-07-21

CVSS v3.1

8.6

High

VectorAV: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.

Exploit

Fix

Protection Mechanism Failure

Code Injection

Found an issue in the description? Have something to add? Feel free to write us 👾

Weakness Enumeration

Related Identifiers

CVE-2026-40158
GHSA-3C4R-6P77-XWR7
PYSEC-2026-2898

Affected Products

Praisonai