Critical (AgentArmorHQ estimate)Sandbox escape

npm PraisonAI codeMode sandbox escape via Function constructor

Product
praisonai
CVE
CVE-2026-57138
Affected
praisonai 1.4.0 to 1.7.1
Fixed in
1.7.2

Last verified against sources: October 26, 2026

Am I affected?

praisonai: affected praisonai 1.4.0 to 1.7.1. Fixed in 1.7.2.

  • Check your version: run npm ls praisonai. Versions >= 1.4.0, <= 1.7.1 of praisonai are affected. [1]

What to do now

  1. Upgrade to the fixed version: run npm install praisonai@1.7.2 (first patched version 1.7.2). [1]
  2. Disable or clearly mark npm codeMode as unsafe until a real isolation boundary exists. [1]
  3. Do not rely on node:vm alone for untrusted code. [1]

General practice, not from the source: if the affected software could read tokens or credentials, rotate them after upgrading; pin versions and review changes before updating tools your agents run.

Discuss this incident

What happened

  • The published npm package praisonai exports a TypeScript built-in tool named codeMode. [1]
  • The implementation does not create an isolation boundary. [1]
  • Code inside codeMode can use the JavaScript prototype chain to recover the real Function constructor. [1]
  • The tool is reachable through the public npm SDK. [1]

Impact

  • An attacker who can supply code to codeMode can escape the advertised sandbox and execute with the privileges of the Node.js PraisonAI process. [1]
  • An attacker can read process environment variables, including API keys and service tokens. [1]
  • An attacker can spawn subprocesses with child_process. [1]
  • An attacker can write or modify files through host filesystem APIs. [1]

What was done

  • Suggested severity: Critical. [1]
  • Do not use host-process new Function plus source-code blocklists as a sandbox. [1]
  • The advisory lists npm/praisonai affected >= 1.4.0, <= 1.7.1 patched 1.7.2. [1]

Sources

  1. GHSA-vmmj-pfw7-fjwp — GitHub Advisory Database

Every statement above was checked against these sources before publishing. Spotted an error? Tell us and we will correct it with a dated note.

Share advisory brief with your team

Copy a plain-text summary for Slack, GitHub issues, or team security channels.

Brief
[CVE-2026-57138] npm PraisonAI codeMode sandbox escape via Function constructor
Product: praisonai | Affected: praisonai 1.4.0 to 1.7.1 | Fixed in: 1.7.2
Summary: The published npm package `praisonai` exports a TypeScript built-in tool named `codeMode`.
Source & remediation on AgentArmorHQ: https://agentarmorhq.com/incidents/2026/06/cve-2026-57138-praisonai
Was this page useful?

Corrections

Report an error or request a correction. We review requests within 5 business days and add a dated correction note.

10 to 2,000 characters. A link to a source helps. Stored as plain text.

Discussions for CVE-2026-57138

Ask questions or share configuration tips. Governed by our Community Rules & Terms.

No posts match this filter yet.

Be the first to ask a question or share a working tip.

Check before you install

Paste a package name or a GitHub link and get a clear answer in seconds: Block, Review or No known issues. No account needed.

Check a package

Questions? Contact us