# CVE-2026-57138: PraisonAI codeMode sandbox escape via Function constructor

- Severity: Critical 9.9 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.48%, higher than 43% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-06-18T14:26:32.000Z
- Modified: 2026-09-17T14:17:14.627Z
- Also known as: GHSA-vmmj-pfw7-fjwp
- Weaknesses: CWE-184, CWE-693
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- MervinPraison PraisonAI: >= 1.4.0, < 1.7.2
- praisonai (npm): from 1.4.0 before 1.7.2

## Every score

- GitHub_M: CVSS:3.1 9.9 Critical `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`
- GitHub: CVSS:3.1 9.9 Critical `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`

## References

- <https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-vmmj-pfw7-fjwp> (exploit, web)
- <https://github.com/MervinPraison/PraisonAI/commit/709a0387853709a5e2f2c34680fa64cada252c27>
- <https://github.com/MervinPraison/PraisonAI/releases/tag/v4.6.60>
- <https://github.com/MervinPraison/PraisonAI> (package)

## Sources

- CVE List: [CVE-2026-57138](https://www.cve.org/CVERecord?id=CVE-2026-57138), CVE Terms of Use, modified 2026-09-17
- GitHub Advisory Database: [GHSA-vmmj-pfw7-fjwp](https://github.com/advisories/GHSA-vmmj-pfw7-fjwp), CC-BY-4.0, modified 2026-07-20
- NVD: [CVE-2026-57138](https://nvd.nist.gov/vuln/detail/CVE-2026-57138), Public domain, modified 2026-09-17

---

Page: https://cve.day/CVE-2026-57138 · Whole record: https://cve.day/CVE-2026-57138.json · Rebuilt by cve.day 2026-11-25T22:59:38.498Z
