PraisonAI codeMode sandbox escape via Function constructor
Summary
| CVE | CVE-2026-57138 |
|---|---|
| State | PUBLISHED |
| Assigner | GitHub_M |
| Source Priority | CVE Program / NVD first with legacy fallback |
| Published | 2026-09-15 11:17:11 UTC |
| Updated | 2026-09-17 14:17:14 UTC |
| Description | PraisonAI is a multi-agent teams system. From 1.4.0 until 1.7.2, codeMode in src/praisonai-ts/src/tools/builtins/code-mode.ts executes untrusted JavaScript with new Function() inside with(sandbox) and relies on a small source-code blocklist plus shadowed process and require properties. Code can use ({}).constructor.constructor to recover the real Function constructor, obtain process and process.mainModule.require, and reach host filesystem and subprocess APIs despite the advertised sandbox. Attackers who control codeMode input can read secrets, modify files, execute commands, or exhaust the host process. This issue is fixed in version 1.7.2. |
Risk And Classification
Primary CVSS: v3.1 9.9 CRITICAL from [email protected]
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
EPSS: 0.007260000 probability, percentile 0.520850000 (date 2026-09-24)
Problem Types: CWE-184 | CWE-693 | CWE-184 CWE-184: Incomplete List of Disallowed Inputs | CWE-693 CWE-693: Protection Mechanism Failure
| Version | Source | Type | Score | Severity | Vector |
|---|---|---|---|---|---|
| 3.1 | [email protected] | Secondary | 9.9 | CRITICAL | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H |
| 3.1 | CNA | DECLARED | 9.9 | CRITICAL | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H |
CVSS v3.1 Breakdown
Attack Vector
NetworkAttack Complexity
LowPrivileges Required
LowUser Interaction
NoneScope
ChangedConfidentiality
HighIntegrity
HighAvailability
HighCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Vendor Declared Affected Products
| Source | Vendor | Product | Version | Platforms |
|---|---|---|---|---|
| CNA | MervinPraison | PraisonAI | affected >= 1.4.0, < 1.7.2 | Not specified |
References
| Reference | Source | Link | Tags |
|---|---|---|---|
| github.com/MervinPraison/PraisonAI/releases/tag/v4.6.60 | [email protected] | github.com | |
| github.com/MervinPraison/PraisonAI/security/advisories/GHSA-vmmj-pfw7-fjwp | 134c704f-9b21-4f2e-91b3-4a467353bcc0 | github.com | |
| github.com/MervinPraison/PraisonAI/commit/709a0387853709a5e2f2c34680fa64... | [email protected] | github.com | |
| CVE Program record | CVE.ORG | www.cve.org | canonical |
| NVD vulnerability detail | NVD | nvd.nist.gov | canonical, analysis |
No vendor comments have been submitted for this CVE.
There are currently no legacy QID mappings associated with this CVE.