Skip to content

Hide Navigation Hide TOC

PraisonAI codeMode JS Sandbox Escape RCE via new Function/with() (GHSA-p69m-4f92-2v84) - ATR-2026-01952 (0cdc519a-c42d-51bc-844a-bd20e04f81e8)

Detects GHSA-p69m-4f92-2v84 (Critical, CVSS 9.8): PraisonAI <= 1.7.1 executes LLM-generated code in its codeMode tool via new Function('sandbox','with(sandbox){...}') (src/praisonai-ts/src/tools/builtins/code-mode.ts L187-191) guarded only by a regex blocklist. Attackers escape the with()-scope by recovering the real global object and reaching child_process. This rule keys on the specific escape primitives chained toward command execution: Function('return this'), (function(){}).constructor('return process'), the 'child_' + 'process' string-split that evades the literal blocklist, and execSync/exec invoked off the recovered require/child_process handle.

Cluster A Galaxy A Cluster B Galaxy B Level
Exploit Public-Facing Application (47d73872-5336-44f7-81e3-d30bc7e039dd) MITRE ATLAS Attack Pattern PraisonAI codeMode JS Sandbox Escape RCE via new Function/with() (GHSA-p69m-4f92-2v84) - ATR-2026-01952 (0cdc519a-c42d-51bc-844a-bd20e04f81e8) Agent Threat Rules 1
Exploit Public-Facing Application - T1190 (3f886f2a-874f-4333-b794-aa6075009b1c) Attack Pattern PraisonAI codeMode JS Sandbox Escape RCE via new Function/with() (GHSA-p69m-4f92-2v84) - ATR-2026-01952 (0cdc519a-c42d-51bc-844a-bd20e04f81e8) Agent Threat Rules 1