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.
Published: 2026-09-15
Score: 9.8 Critical
EPSS: < 1% Very Low
KEV: No
Impact: Remote Code Execution
Action: Immediate Patch
AI Analysis

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.

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

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

Tue, 15 Sep 2026 15:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

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


Tue, 15 Sep 2026 12:00:00 +0000

Type Values Removed Values Added
First Time appeared Mervinpraison
Mervinpraison praisonai
Vendors & Products Mervinpraison
Mervinpraison praisonai

Tue, 15 Sep 2026 10:30:00 +0000

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'}


Subscriptions

Mervinpraison Praisonai
cve-icon MITRE

Status: PUBLISHED

Assigner: GitHub_M

Published:

Updated: 2026-09-15T13:52:47.854Z

Reserved: 2026-06-24T01:45:48.697Z

Link: CVE-2026-57141

cve-icon Vulnrichment

Updated: 2026-09-15T13:30:39.239Z

cve-icon NVD

Status : Deferred

Published: 2026-09-15T11:17:11.617

Modified: 2026-09-15T14:45:28.563

Link: CVE-2026-57141

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-09-17T20:30:17Z

Weaknesses
  • CWE-94

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