{"id":"CVE-2026-57138","published":"2026-09-15T10:22:19Z","modified":"2026-09-17T14:13:25Z","title":"PraisonAI codeMode sandbox escape via Function constructor","vendor":"MervinPraison","product":"PraisonAI","tier":"tail","description":{"text":"PraisonAI is a multi-agent teams system. From 1.4.0 until 1.7.2, codeMode in src/praisonai-ts/src/tools/builtins/code-mode.ts executes untrusted JavaScript with new Function() inside with(sandbox) and relies on a small source-code blocklist plus shadowed process and require properties. Code can use ({}).constructor.constructor to recover the real Function constructor, obtain process and process.mainModule.require, and reach host filesystem and subprocess APIs despite the advertised sandbox. Attackers who control codeMode input can read secrets, modify files, execute commands, or exhaust the host process. This issue is fixed in version 1.7.2.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.9,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00726,"percentile":0.5505,"provenance":"source"},"cwes":[{"id":"CWE-184","name":"Incomplete List of Disallowed Inputs"},{"id":"CWE-693","name":"Protection Mechanism Failure"}],"references":[{"url":"https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-vmmj-pfw7-fjwp","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/MervinPraison/PraisonAI/commit/709a0387853709a5e2f2c34680fa64cada252c27","tags":["x_refsource_MISC"]},{"url":"https://github.com/MervinPraison/PraisonAI/releases/tag/v4.6.60","tags":["x_refsource_MISC"]}],"priority":{"score":17.9,"factors":[{"name":"EPSS percentile","points":11.01},{"name":"CVSS severity","points":6.93}]},"vendorSlug":"mervinpraison","affectedVersions":[{"vendor":"MervinPraison","product":"PraisonAI","versions":[">= 1.4.0, < 1.7.2"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2026-09-17T14:12:03.702622Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"npm","package":"praisonai","vulnerableRanges":[">=1.4.0, <1.7.2"],"patched":["1.7.2"],"from":["GHSA-vmmj-pfw7-fjwp"],"provenance":"source"}],"summary":{"text":"PraisonAI's codeMode feature, in the src/praisonai-ts/src/tools/builtins/code-mode.ts component, runs untrusted JavaScript through new Function() inside a with(sandbox) block, protected only by a small source-code blocklist and shadowed process and require properties. An attacker who can supply input to codeMode, with a low-privileged account and no user interaction, can escape the advertised sandbox by recovering the real Function constructor, which gives access to host filesystem and subprocess APIs to read secrets, modify files, run commands, or exhaust the host process.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:34:22Z"},"euvd":{"id":"EUVD-2026-78420","exploited":false,"provenance":"source"}}