PraisonAI codeMode sandbox escape via Function constructor (MervinPraison PraisonAI)
At a glance
- Source
- NVD
- EPSS
- EPSS 0.73 % Β· percentile 54 ()
- State
- PUBLISHED
- Published
- Updated
- Assigner
- GitHub_M
- NVD status
- Deferred
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.
Weaknesses (CWE)
References
Scores
| Version | Score | Vector | Scored by |
|---|---|---|---|
| CVSS 3.1 | CRITICAL 9.9 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H | GitHub_M |
| CVSS 3.1 | CRITICAL 9.9 | CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H | NVD Β· security-advisories@github.com (Secondary) |
Advisories
- GHSA-vmmj-pfw7-fjwp β npm PraisonAI codeMode sandbox escape via Function constructor
European references
- ENISA EUVD Β· EUVD-2026-78420
- GCVE Β· GCVE-0-2026-57138
Affected products
| Product | Versions |
|---|---|
| MervinPraison Β· PraisonAI | affected >= 1.4.0, < 1.7.2 |
Sources
| Source | Licence |
|---|---|
| CVE List (CVEProject cvelistV5) | CVE Program Terms of Use |
| EPSS (FIRST.org) | FIRST β attribution requested |
| ENISA EUVD | ENISA β reproduction authorised, source acknowledged |
| NVD (NIST) via fkie-cad/nvd-json-data-feeds | Public domain β this product uses data from the NVD API but is not endorsed or certified by the NVD |