Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. praisonaiagents
  4. ›
  5. CVE-2026-39888

CVE-2026-39888: PraisonAI has sandbox escape via exception frame traversal in `execute_code` (subprocess mode)

April 8, 2026 (updated April 9, 2026)

execute_code() in praisonaiagents.tools.python_tools defaults to sandbox_mode="sandbox", which runs user code in a subprocess wrapped with a restricted __builtins__ dict and an AST-based blocklist. The AST blocklist embedded inside the subprocess wrapper (blocked_attrs, line 143 of python_tools.py) contains only 11 attribute names — a strict subset of the 30+ names blocked in the direct-execution path. The four attributes that form a frame-traversal chain out of the sandbox are all absent from the subprocess list:

AttributeIn subprocess blocked_attrsIn direct-mode _blocked_attrs
__traceback__NOYES
tb_frameNOYES
f_backNOYES
f_builtinsNOYES

Chaining these attributes through a caught exception exposes the real Python builtins dict of the subprocess wrapper frame, from which exec can be retrieved and called under a non-blocked variable name — bypassing every remaining security layer.

Tested and confirmed on praisonaiagents 1.5.113 (latest), Python 3.10.


References

  • github.com/MervinPraison/PraisonAI
  • github.com/MervinPraison/PraisonAI/security/advisories/GHSA-qf73-2hrx-xprp
  • github.com/advisories/GHSA-qf73-2hrx-xprp
  • nvd.nist.gov/vuln/detail/CVE-2026-39888

Code Behaviors & Features

Detect and mitigate CVE-2026-39888 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Dependency Scanning using SBOM also detects vulnerabilities from proprietary advisories that this site does not include. Learn more about Dependency Scanning using SBOM →

Affected versions

All versions before 1.5.115

Fixed versions

  • 1.5.115

Solution

Upgrade to version 1.5.115 or above.

Impact 9.9 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-657: Violation of Secure Design Principles
  • CWE-693: Protection Mechanism Failure

Source file

pypi/praisonaiagents/CVE-2026-39888.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sun, 08 Nov 2026 00:16:59 +0000.