CVE-2026-57141
Received Received - Intake

Code Injection in PraisonAI via Dynamic Module Access

Vulnerability report for CVE-2026-57141, including description, CVSS score, EPSS score, affected products, exploitability, helpful resources, and attack-flow context.

Publication date: 2026-09-15

Last updated on: 2026-09-15

Assigner: GitHub, Inc.

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.

CVSS Scores

EPSS Scores

Probability:
Percentile:

Meta Information

Published
2026-09-15
Last Modified
2026-09-15
Generated
2026-09-15
AI Q&A
2026-09-15
EPSS Evaluated
N/A
NVD
EUVD

Affected Vendors & Products

Showing 3 associated CPEs
Vendor Product Version / Range
praisonai praisonai to 1.7.2 (exc)
mervinpraison praisonai to 1.7.2 (exc)
mervinpraison praisonai 1.7.2

Helpful Resources

Exploitability

CWE
CWE Icon
KEV
KEV Icon
CWE ID Description
CWE-94 The product constructs all or part of a code segment using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the syntax or behavior of the intended code segment.

Attack-Flow Graph

AI Quick Actions

Instant insights powered by AI
Executive Summary

CVE-2026-57141 is a critical vulnerability in PraisonAI versions 1.7.1 and earlier. It allows remote code execution through a sandbox escape in the codeMode tool. The vulnerability occurs because the tool uses new Function() with a with(sandbox) pattern to execute code, which fails to properly isolate the global object. Attackers can bypass security blocks by recovering the global object using Function('return this')() and evading blocklists via string concatenation to access restricted modules like child_process. This enables full system access, including file operations, command execution, and environment variable theft.

Detection Guidance

To detect this vulnerability, check if PraisonAI versions prior to 1.7.2 are installed by running: npm list praisonai or npm list -g praisonai. Inspect the codeMode tool in src/praisonai-ts/src/tools/builtins/code-mode.ts for the insecure pattern using new Function() with with(sandbox). Monitor for unusual system commands or file access patterns in logs.

Impact Analysis

If you use PraisonAI versions 1.7.1 or earlier, an attacker who can influence the code argument could execute arbitrary commands on your system with the same privileges as the PraisonAI process. This could lead to data theft, file corruption, installation of malware, or complete system compromise. The vulnerability requires no special privileges or user interaction to exploit, making it particularly dangerous for exposed systems.

Compliance Impact

This vulnerability likely violates compliance requirements under GDPR and HIPAA due to unauthorized code execution capabilities. GDPR requires protection of personal data, which could be compromised through file access or command execution. HIPAA mandates strict controls over protected health information, which could be exposed or altered. The vulnerability's ability to access environment credentials and execute OS commands creates significant compliance risks for organizations handling sensitive data.

Mitigation Strategies

Immediately upgrade PraisonAI to version 1.7.2 or later using npm update praisonai. If upgrading is not possible, disable the codeMode tool or restrict its usage to trusted inputs. Replace the insecure code execution pattern with proper isolation methods like the Node.js vm module or isolated-vm.

Chat Assistant

Ask questions about this CVE
Hi! I’m here to help you understand CVE-2026-57141. Ask me anything about the vulnerability, its impact, or mitigation strategies.
0/70

EPSS Chart