CVE-2026-57141

PraisonAI: Remote Code Execution via Sandbox Escape in `codeMode` Tool

Published Sep 15, 2026 CVSS 3.1 · 9.8 Critical EPSS < 1% KEV · Not listed
Description
PraisonAI is a multi-agent teams system. Prior to 1.7.2, the codeMode tool in src/praisonai-ts/src/tools/builtins/code-mode.ts executes model-generated JavaScript with new Function() and with(sandbox), while a regular-expression blocklist can be bypassed with Function('return this')() to recover the global object and by constructing the child_process module name dynamically. An attacker who can influence the code argument can access host process capabilities, read or write files, obtain environment credentials, and execute operating-system commands with the PraisonAI process privileges. This issue is fixed in version 1.7.2.

Analysis

AI-generated

Technical impact

The codeMode tool in PraisonAI, before version 1.7.2, evaluated JavaScript supplied by a language model using new Function() in combination with the with(sandbox) syntax. A crafted regular expression bypass allows an attacker to execute Function('return this')() in order to recover the global object and to dynamically construct the child_process module name. If the attacker can influence the code argument, they can gain the PraisonAI process’s privileges, read or write arbitrary files, access environment credentials, and execute operating‑system commands. This critical code injection and sandbox escape flaw is mitigated in version 1.7.2.

Affected Systems

All versions of MervinPraison’s PraisonAI prior to 1.7.2 are vulnerable, including releases bundled in the v4.6.60 package and earlier. The issue is fixed in version 1.7.2 and subsequent releases.

Risk and Exploitability

The vulnerability carries a CVSS score of 9.8, indicating a critical impact level. The EPSS score of less than 1% suggests that exploitation has not yet been widely observed, and the vulnerability is not listed in the CISA KEV catalog. The likely attack vector requires an attacker to supply tainted code to the codeMode tool, which, if not adequately protected, leads to remote code execution with full process privileges.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade PraisonAI to version 1.7.2 or later.
  • If an upgrade cannot be performed immediately, disable the codeMode tool entirely or constrain the code argument to a strict whitelist of permitted tokens, thereby preventing malicious code evaluation.
  • Implement runtime monitoring for new Function usage and for spawned child_process instances to detect any unexpected code execution after the remediation.

Generated by OpenCVE AI on September 17, 2026 at 17:35 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-p69m-4f92-2v84 PraisonAI: Remote Code Execution via Sandbox Escape in `codeMode` Tool
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'none', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Mervinpraison
Mervinpraison praisonai
Vendors & Products Mervinpraison
Mervinpraison praisonai
Type Values Removed Values Added
Description PraisonAI is a multi-agent teams system. Prior to 1.7.2, the codeMode tool in src/praisonai-ts/src/tools/builtins/code-mode.ts executes model-generated JavaScript with new Function() and with(sandbox), while a regular-expression blocklist can be bypassed with Function('return this')() to recover the global object and by constructing the child_process module name dynamically. An attacker who can influence the code argument can access host process capabilities, read or write files, obtain environment credentials, and execute operating-system commands with the PraisonAI process privileges. This issue is fixed in version 1.7.2.
Title PraisonAI: Remote Code Execution via Sandbox Escape in `codeMode` Tool
Weaknesses CWE-94
References
Metrics cvssV3_1

{'score': 9.8, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Weaknesses
  • CWE-94

    Improper Control of Generation of Code ('Code Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Sep 15, 2026, 1:52 PM
Reserved
Jun 24, 2026, 1:45 AM
Status
Deferred
Published
Sep 15, 2026, 11:17 AM
Modified
Sep 15, 2026, 2:45 PM