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, `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). PraisonAI version 4.6.40 and praisonaiagents version 1.6.40 contain an updated fix.
- Published
- Jul 21, 2026
- Updated
- Jul 21, 2026
- EPSS
- 0.9% · 58th percentile
- CWE
- CWE-184
Sign in to follow · You’ll be notified if a followed record enters KEV, gets an exploit or is updated.
Report tools
Action score
39
Monitor
Low priority for now.
- CVSS
- 39 / 40 · 9.9 / 10
- CISA KEV
- 0 / 30 · Not listed
- EPSS
- 0 / 30 · 0.9%
CISA SSVC decision
- Exploitation
- proof of concept
- Automatable
- no
- Technical impact
- total
Vulnrichment: CISA's decision-tree inputs.
CNA vs NVD score
- NVD
- —
- CNA · GitHub_M
- 9.9
- NVD has not scored this yet; the score shown is the CNA’s.
The score given by the assigning authority versus NVD’s independent score. A gap means the severity is contested.
Noroxi analysis
No Noroxi analysis for this record yet
We don't hand-write analysis for the hundreds of thousands of vulnerabilities in the database; that wouldn't be honest. For notable, high-impact vulnerabilities our team writes the mechanism, detection and remediation steps.
We use this product, ask for helpAffected systems
—
Versions reported by the vendor
Affected version ranges reported by the assigning authority (GitHub_M). Independent of NVD's CPE analysis and usually ahead of it.
MervinPraison < 1.6.40
- praisonaiagentsaffected
MervinPraison PraisonAI
- < 4.6.40affected
Package-level exposure
OSV and GitHub Advisory data: ecosystem, package and range. SBOM matching uses this table.
| Ecosystem | Package | Affected range | Fix |
|---|---|---|---|
| PyPI | praisonai | before 4.6.40 | 4.6.40 |
| PyPI | praisonaiagents | before 1.6.40 | 1.6.40 |
Same product
mervinpraison: all recordsOther highest-scoring records for the same primary product.
- CVE-2026-61447PraisonAI before 1.6.78 Remote Code Execution via CodeAgent41Plan
- CVE-2026-48168PraisonAI: GitHub Actions Claude workflow command injection via unquoted PR branch name40Plan
- CVE-2026-57148praisonai-platform 0.1.4 still boots on the hardcoded JWT secret dev-secret-change-me (default-open production guard)39Monitor
- CVE-2026-57147praisonai-platform: default JWT signing secret 'dev-secret-change-me' enables token forgery39Monitor
- CVE-2026-57141PraisonAI: Remote Code Execution via Sandbox Escape in `codeMode` Tool39Monitor
- CVE-2026-57139PraisonAI MCPServer exposes unauthenticated HTTP tools/call39Monitor
Remediation
Which version to upgrade to
Fix versions compiled from the vendor, package registries and Microsoft. Verify the vendor's note before upgrading.
| Product / package | Fixed version | Source |
|---|---|---|
| PyPI:praisonai | 4.6.40 | Package registry (OSV) |
| PyPI:praisonaiagents | 1.6.40 | Package registry (OSV) |
Exploit status
No known public exploit
No public exploit has been observed yet. That doesn't mean you're safe, only that the bar is a little higher.
Research context
For pentesters and researchers: attack profile, score disagreement, timeline, patch commits, credits, variant and chain candidates, bug bounty scope. All derived from existing data; no exploit code.
Timeline
From publication to today: proof of concept, Metasploit module, CISA KEV and fix record. Dates are as reported by the sources.
No dated events beyond publication.
FIRST EPSS daily score; only changes of 0.01 or more are recorded (step chart).
Patch and commit links
Commit, PR and diff links among the references. A starting point for patch-diffing and variant hunting; fixes, not exploits.
Credits
All researchersFinders, reporters and analysts named in the CNA record. Click a name for that researcher’s other records.
No credits in the CNA record.
Variant candidates
Same product, same weakness class, within 18 months. If the patch missed the root cause, the sibling bug is here.
- CVE-2026-5713856 days apartPraisonAI codeMode sandbox escape via Function constructor39Monitor
Chain candidates
An authentication bypass and a privilege-requiring bug in the same product, published close together: combined they may become an unauthenticated path.
- CVE-2026-473930 days apartPraisonAI `deploy --type api` emits a Flask server with authentication disabled by default39Monitor
- CVE-2026-473960 days apartPraisonAI call server exposes unauthenticated agent listing, invocation, and deletion when CALL_SERVER_TOKEN is unset39Monitor
Bug bounty scope
No known public program.
Source: bounty-targets-data (public HackerOne, Bugcrowd, Intigriti, YesWeHack listings).
Technical details
Attack conditions
- Anyone who can reach it over the internet can trigger it.
- A low-privileged account is enough.
- No user action is required.
- No special conditions are required; it is repeatable.
If successful
- Confidentiality
- high · data can be read
- Integrity
- high · data or configuration can be modified
- Availability
- high · the service can be disrupted
Impact can extend beyond the vulnerable component (scope changes).
- Attack vector
- Network
- Attack complexity
- Low
- Privileges required
- Low
- User interaction
- None
- Scope
- Changed
- Confidentiality impact
- High
- Integrity impact
- High
- Availability impact
- High
Weakness class (CWE)
CWE-184 · Incomplete List of Disallowed InputsCVSS vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
nvd-secondary
Attack context
MITRE CAPEC attack patterns and ATT&CK techniques for this weakness class (CWE). A starting point for detection rules and threat hunting.
Attack patterns (CAPEC)
- Double EncodingCAPEC-120likelihood: Low · Medium
- Command DelimitersCAPEC-15likelihood: High · High
- Flash InjectionCAPEC-182likelihood: High · Medium
- Using Leading 'Ghost' Character Sequences to Bypass Input FiltersCAPEC-3likelihood: Medium · Medium
- Exploiting Multiple Input Interpretation LayersCAPEC-43likelihood: Medium · High
- Argument InjectionCAPEC-6likelihood: High · High
- Using Unicode Encoding to Bypass Validation LogicCAPEC-71likelihood: Medium · High
- User-Controlled FilenameCAPEC-73likelihood: High · High
ATT&CK techniques
—
Change log
- Fix✗ → ✓
For records you follow, these changes also arrive as notifications. →
References
- github.com/MervinPraison/PraisonAI/commit/b0d8f777528f3253a0cfb0a3ef65455da6ae32f6
- github.com/MervinPraison/PraisonAI/pull/1684
- github.com/MervinPraison/PraisonAI/security/advisories/GHSA-4mr5-g6f9-cfrh
Vendor advisories and official records. Exploit/PoC links are deliberately left out.