Advisory Database
  • Advisories
  • Dependency Scanning
  1. npm
  2. ›
  3. praisonai
  4. ›
  5. GHSA-p69m-4f92-2v84

GHSA-p69m-4f92-2v84: PraisonAI: Remote Code Execution via Sandbox Escape in `codeMode` Tool

June 18, 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.

References

  • github.com/MervinPraison/PraisonAI/security/advisories/GHSA-p69m-4f92-2v84
  • github.com/advisories/GHSA-p69m-4f92-2v84

Code Behaviors & Features

Detect and mitigate GHSA-p69m-4f92-2v84 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.7.2

Fixed versions

  • 1.7.2

Solution

Upgrade to version 1.7.2 or above.

Impact 9.8 CRITICAL

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

npm/praisonai/GHSA-p69m-4f92-2v84.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Tue, 23 Jun 2026 12:22:31 +0000.