CVE-2026-57141
Published:July 20, 2026
Updated:August 27, 2026
The "codeMode" tool in "src/praisonai-ts/src/tools/builtins/code-mode.ts" uses "new Function()" with a "with(sandbox)" pattern to execute LLM-generated code. The blocklist-based "sandbox" can be trivially bypassed via "Function('return this')()" to recover the global object, followed by "global.require()" with string concatenation to evade the blocklist regex. This allows full arbitrary code execution on the host system. This affects all deployments where the code-mode tool is enabled for agents.
Affected Packages
praisonai (NPM):
Affected version(s) >=1.0.0 <1.7.2Fix Suggestion:
Update to version 1.7.2Related Resources (2)
Do you need more information?
Contact UsCVSS v4
Base Score:
9.3
Attack Vector
NETWORK
Attack Complexity
LOW
Attack Requirements
NONE
Privileges Required
NONE
User Interaction
NONE
Vulnerable System Confidentiality
HIGH
Vulnerable System Integrity
HIGH
Vulnerable System Availability
HIGH
Subsequent System Confidentiality
NONE
Subsequent System Integrity
NONE
Subsequent System Availability
NONE
CVSS v3
Base Score:
9.8
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
NONE
Scope
UNCHANGED
Confidentiality
HIGH
Integrity
HIGH
Availability
HIGH
Weakness Type (CWE)
Improper Control of Generation of Code ('Code Injection')