{"id":"CVE-2026-39888","published":"2026-04-08T20:41:56Z","modified":"2026-04-09T20:21:16Z","title":"PraisonAIAgents has a sandbox escape via exception frame traversal in `execute_code` (subprocess mode)","vendor":"MervinPraison","product":"praisonaiagents","tier":"tail","description":{"text":"PraisonAI is a multi-agent teams system. Prior to 1.5.115, 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 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 (__traceback__, tb_frame, f_back, and f_builtins). 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. This vulnerability is fixed in 1.5.115.","provenance":"source","from":"CVE.org"},"cvss":{"score":10,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00646,"percentile":0.45578,"provenance":"source"},"cwes":[{"id":"CWE-657","name":"Violation of Secure Design Principles"},{"id":"CWE-693","name":"Protection Mechanism Failure"}],"references":[{"url":"https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-qf73-2hrx-xprp","tags":["x_refsource_CONFIRM"]}],"priority":{"score":16.1,"factors":[{"name":"EPSS percentile","points":9.12},{"name":"CVSS severity","points":7.0}]},"vendorSlug":"mervinpraison","affectedVersions":[{"vendor":"MervinPraison","product":"praisonaiagents","versions":["< 1.5.115"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2026-04-09T20:20:32.970513Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"PyPI","package":"praisonaiagents","vulnerableRanges":["<1.5.115"],"patched":["1.5.115"],"from":["GHSA-qf73-2hrx-xprp","PYSEC-2026-486"],"provenance":"source"}],"euvd":{"id":"EUVD-2026-20635","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-mervinpraison-praisonaiagents-cve-2026-39888","children":[{"from":"CVE-2026-39888","to":"CVE-2026-47392","relation":"bypass","confidence":"high","kind":"lineage","evidence":[{"kind":"text","provenance":"source","relation":"bypass","quote":"This is a novel bypass that survives all patches for CVE-2026-39888 (frame traversal), CVE-2026-34938 (str subclass), and CVE-2026-40158 (`type.__getattribute__` trampoline).","from":"CVE.org","in":"CVE-2026-47392"}]}],"packageHistory":[{"cve":"CVE-2026-34937","published":"2026-04-03","fixed":"1.5.90","kev":false},{"cve":"CVE-2026-34938","published":"2026-04-03","fixed":"1.5.90","kev":false},{"cve":"CVE-2026-34954","published":"2026-04-03","fixed":"1.5.95","kev":false,"link":{"from":"CVE-2026-34954","to":"CVE-2026-39888","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"PyPI:praisonaiagents","fromFixed":"1.5.95","toFixed":"1.5.115","daysApart":5}]}},{"cve":"CVE-2026-39888","published":"2026-04-08","fixed":"1.5.115","kev":false},{"cve":"CVE-2026-56078","published":"2026-06-18","fixed":"1.5.115","kev":false},{"cve":"CVE-2026-40111","published":"2026-04-09","fixed":"1.5.128","kev":false},{"cve":"CVE-2026-40117","published":"2026-04-09","fixed":"1.5.128","kev":false}],"package":"PyPI:praisonaiagents"}}