CVE-2026-57138 PraisonAI codeMode sandbox escape via Function constructor
- Published
- Updated
- Exploit status
- No public exploit known
- CISA SSVC
- Proof of concept public · automatable: no · technical impact: total
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.
Upgrade path
2 packages: 1 fixed.
| Package | Affected | Fixed in | Status |
|---|---|---|---|
| npm praisonai(npm) | >= 1.4.0, < 1.7.2; >= 1.4.0, <= 1.7.1 | 1.7.2 | Fixed |
| MervinPraison PraisonAI | = >= 1.4.0, < 1.7.2 | No fix listed | Versions listed |
Affected products
| Product | Affected versions | Fixed in |
|---|---|---|
| MervinPraison PraisonAI | = >= 1.4.0, < 1.7.2 | No fix listed |
| npm praisonai(npm) | >= 1.4.0, <= 1.7.1 | No fix listed |
| npm praisonai(npm) | >= 1.4.0, < 1.7.2 | 1.7.2 |
References
- https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-vmmj-pfw7-fjwp exploit vendor-advisory
- https://github.com/MervinPraison/PraisonAI/commit/709a0387853709a5e2f2c34680fa64cada252c27
- https://github.com/MervinPraison/PraisonAI/releases/tag/v4.6.60
- github.com
- github.com product
- ENISA EUVD EUVD-2026-78420 third-party-advisory