Security mailing lists by PureSourceCode

CVE-2026-40158

HIGH 7.8CVSS 3.1

PraisonAI Vulnerable to Code Injection and Protection Mechanism Failure

PraisonAI is a multi-agent teams system. Prior to 4.5.128, PraisonAI's AST-based Python sandbox can be bypassed using type.getattribute trampoline, allowing 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 like subclasses, globals, and bases. However, the filter only checks ast.Attribute nodes, allowing a bypass. The sandbox relies on AST-based filtering of attribute access but fails to account for dynamic attribute resolution via built-in 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. This vulnerability is fixed in 4.5.128.

Published
10 Apr 2026
Last modified
26 Oct 2026
Assigned by
security-advisories@github.com
NVD status
Analyzed
Weakness
CWE-693CWE-94
Also known as
GHSA-3c4r-6p77-xwr7PYSEC-2026-2898
Sources
NVDJSONOSV GHSA-3c4r-6p77-xwr7JSONOSV PYSEC-2026-2898JSON

Scores

SourceScored byVersionScoreVector / decision
NVD security-advisories@github.com (Secondary) CVSS 3.1 HIGH 8.6 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
OSV GitHub CVSS 3.1 HIGH 8.6 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
OSV PyPA CVSS 3.1 HIGH 8.6 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:H
NVD nvd@nist.gov (Primary) CVSS 3.1 HIGH 7.8 CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Affected

SourceVendor / ecosystemProduct / packageAffected versionsFixed in
NVD praison praisonai
cpe:2.3:a:praison:praisonai:*:*:*:*:*:*:*:*
< 4.5.128 4.5.128
OSV PyPI praisonai < 4.5.128 4.5.128

References

History

  • 25 Nov 2026 21:02 UTC · NVD: first stored (published 10 Apr 2026)
  • 25 Nov 2026 20:12 UTC · OSV: first stored (published 13 Jul 2026)
  • 25 Nov 2026 20:11 UTC · OSV: first stored (published 10 Apr 2026)
An unhandled error has occurred. Reload ×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.