---
title: "CVE-2026-57138: npm PraisonAI codeMode sandbox escape via Function constructor"
url: https://erroneo.us/security/cve/CVE-2026-57138/
description: "CVE-2026-57138 (praisonai (npm)): PraisonAI is a multi-agent teams system. From 1.4.0 until 1.7.2, codeMode in…"
type: vulnerability-record
section: "Security Digest"
date_published: 2026-09-15
date_modified: 2026-09-17
publisher: erroneo.us
author: erroneo.us Security Desk
cve: "CVE-2026-57138"
kev: false
cvss: 9.9
epss: 0.00726
license: All rights reserved. Quote with attribution and a link.
---

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

**Signal:** Critical, preconditions apply. Severe if exploited, but exploitation needs conditions that may not apply to you. (Computed from CISA KEV, EPSS and CVSS; not an editorial verdict.)

## Should you act?

- Not in CISA KEV , but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
- EPSS 0.7% , percentile 54: FIRST’s model estimates a 0.7% chance of exploitation activity in the next 30 days, higher than 54% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
- Needs an account (low (any account)). Exposure depends on who can log in.
- Only applies if your dependency tree includes praisonai (npm) >= 1.4.0, <= 1.7.1, fixed in 1.7.2 . Check your lockfile, including transitive dependencies.

## What it is

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.

## Affected packages

- npm `praisonai` >= 1.4.0, <= 1.7.1 → fixed: 1.7.2

## Affected products (CVE record)

- MervinPraison PraisonAI: >= 1.4.0, < 1.7.2

## Severity

- GitHub_M CVSS 3.1: 9.9 `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 `CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H`

## Exploitation

- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation poc , automatable no , technical impact total .
- FIRST EPSS (model of 2026-10-21): 0.73% probability of exploitation activity in the next 30 days; percentile 54.

## Sources

- [GitHub Advisory GHSA-vmmj-pfw7-fjwp](https://github.com/advisories/GHSA-vmmj-pfw7-fjwp)
- [CVE.org record CVE-2026-57138](https://www.cve.org/CVERecord?id=CVE-2026-57138)
- [NVD entry CVE-2026-57138](https://nvd.nist.gov/vuln/detail/CVE-2026-57138)
- [github.com](https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-vmmj-pfw7-fjwp)
- [github.com](https://github.com/MervinPraison/PraisonAI/commit/709a0387853709a5e2f2c34680fa64cada252c27)
- [github.com](https://github.com/MervinPraison/PraisonAI/releases/tag/v4.6.60)

---
Source page: https://erroneo.us/security/cve/CVE-2026-57138/ · Security Digest: https://erroneo.us/security/ · More: https://erroneo.us/llms.txt
