Security Digest · Vulnerability record

CVE-2026-47392: PraisonAI vulnerable to sandbox escape via `print.__self__` builtins module leak in `execute_code` (subprocess mode)

PraisonAI is a multi-agent teams system. Prior to version 4.6.40 of PraisonAI, corresponding to version 1.6.40 of praisonaiagents, executecode() in praisonaiagents/tools/pythontools.py (v1.6.37, subprocess sandbox mode) can be fully bypassed using print.self to retrieve the real Python builtins module, from which…

CVSS 9.9 Critical EPSS 0.9% · p59

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.9%, percentile 59: FIRST’s model estimates a 0.9% chance of exploitation activity in the next 30 days, higher than 59% of all scored CVEs (moderate). 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.6.39, fixed in 1.6.40; PraisonAI (PyPI) <= 4.6.39, fixed in 4.6.40. Check your lockfile, including transitive dependencies.

What it is

PraisonAI is a multi-agent teams system. Prior to version 4.6.40 of PraisonAI, corresponding to version 1.6.40 of praisonaiagents, executecode() in praisonaiagents/tools/pythontools.py (v1.6.37, subprocess sandbox mode) can be fully bypassed using print.self to retrieve the real Python builtins module, from which import can be extracted via vars() and runtime string construction. This achieves arbitrary OS command execution on the host, completely defeating the sandbox. 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). PraisonAI version 4.6.40 and praisonaiagents version 1.6.40 contain an updated fix.

From the GitHub advisory

Summary

executecode() in praisonaiagents/tools/pythontools.py (v1.6.37, subprocess sandbox mode) can be fully bypassed using print.self to retrieve the real Python builtins module, from which import can be extracted via vars() and runtime string construction. This achieves arbitrary OS command execution on the host, completely defeating the sandbox.

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).

---

Severity

Weakness type: CWE-184, CWE-693.

Product: praisonaiagents (PyPI) · Assigned by: GitHub_M · Published: 2026-07-21

Affected and fixed versions

EcosystemPackageVulnerableFirst fixed
PyPIpraisonaiagents<= 1.6.391.6.40
PyPIPraisonAI<= 4.6.394.6.40
VendorProductAffected versions (per CVE record)
MervinPraisonPraisonAI< 4.6.40
MervinPraison< 1.6.40praisonaiagents

Severity scores

Scored byCVSSScoreVector
GitHub_M3.19.9 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.88% probability of exploitation activity in the next 30 days; percentile 59.

Timeline

  • — GitHub-reviewed advisory GHSA-4mr5-g6f9-cfrh published (critical)
  • — CVE record last updated
  • — CVE record published by GitHub_M

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-4mr5-g6f9-cfrh github.com
  2. CVE.org record CVE-2026-47392 cve.org
  3. NVD entry CVE-2026-47392 nvd.nist.gov

Other references from the CVE record and advisory

  1. github.com github.com
  2. github.com github.com
  3. github.com github.com

Critical PyPI advisories · Today’s Security Digest