Security Digest · Vulnerability record

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

PraisonAI is a multi-agent teams system. Prior to 1.5.115, executecode() in praisonaiagents.tools.pythontools defaults to sandboxmode="sandbox", which runs user code in a subprocess wrapped with a restricted builtins dict and an AST-based blocklist.

CVSS 10.0 Critical EPSS 0.6% · p48

Should you act?

Critical, preconditions apply

Severe if exploited, but exploitation needs conditions that may not apply to you. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.

  • Not in CISA KEV, but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
  • EPSS 0.6%, percentile 48: FIRST’s model estimates a 0.6% chance of exploitation activity in the next 30 days, higher than 48% of all scored CVEs (low). EPSS is a probability, not a verdict.
  • Needs an account (low (any account)). Exposure depends on who can log in.
  • Only applies if your dependency tree includes praisonaiagents (PyPI) <= 1.5.114, fixed in 1.5.115. Check your lockfile, including transitive dependencies.

What it is

PraisonAI is a multi-agent teams system. Prior to 1.5.115, executecode() in praisonaiagents.tools.pythontools defaults to sandboxmode="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 (blockedattrs of pythontools.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, tbframe, fback, and fbuiltins). 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.

From the GitHub advisory

Summary

executecode() in praisonaiagents.tools.pythontools defaults to sandboxmode="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 (blockedattrs, line 143 of pythontools.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:

| Attribute | In subprocess blockedattrs | In direct-mode blockedattrs | |---|---|---| | traceback | NO | YES | | tbframe | NO | YES | | fback | NO | YES | | fbuiltins | NO | YES |

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.

Weakness type: CWE-657, CWE-693.

Product: praisonaiagents (PyPI) · Assigned by: GitHub_M · Published: 2026-04-08

Affected and fixed versions

EcosystemPackageVulnerableFirst fixed
PyPIpraisonaiagents<= 1.5.1141.5.115
VendorProductAffected versions (per CVE record)
MervinPraisonpraisonaiagents< 1.5.115

Severity scores

Scored byCVSSScoreVector
GitHub_M3.110 CriticalCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
GitHub3.19.9 CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
  • Attack vector: network (remotely reachable)
  • Attack complexity: low
  • Privileges required: low (any account)
  • User interaction: none
  • Scope: changed (can affect other components)

CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.

Exploitation and urgency

  • CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
  • CISA SSVC assessment: exploitation poc, automatable no, technical impact total.
  • FIRST EPSS (model of 2026-10-21): 0.61% probability of exploitation activity in the next 30 days; percentile 48.

Timeline

  • — CVE record published by GitHub_M
  • — GitHub-reviewed advisory GHSA-qf73-2hrx-xprp published (critical)
  • — CVE record last updated

Sources and references

Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.

Vulnerability records

  1. GitHub Advisory GHSA-qf73-2hrx-xprp github.com
  2. CVE.org record CVE-2026-39888 cve.org
  3. NVD entry CVE-2026-39888 nvd.nist.gov

Other references from the CVE record and advisory

  1. github.com github.com

Critical PyPI advisories · Today’s Security Digest