PraisonAI codeMode sandbox escape via Function constructor (MervinPraison PraisonAI)

CVE-2026-57138
CRITICAL 9.9

At a glance

Source
NVD
EPSS
EPSS 0.73 % Β· percentile 54 ()
State
PUBLISHED
Published
Updated
Assigner
GitHub_M
NVD status
Deferred

Description

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.

Weaknesses (CWE)

  • CWE-184 β€” Incomplete List of Disallowed Inputs
  • CWE-693 β€” Protection Mechanism Failure

References

Scores

VersionScoreVectorScored by
CVSS 3.1CRITICAL 9.9CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:HGitHub_M
CVSS 3.1CRITICAL 9.9CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:HNVD Β· security-advisories@github.com (Secondary)

Advisories

European references

Affected products

ProductVersions
MervinPraison Β· PraisonAIaffected >= 1.4.0, < 1.7.2

Sources

SourceLicence
CVE List (CVEProject cvelistV5)CVE Program Terms of Use
EPSS (FIRST.org)FIRST β€” attribution requested
ENISA EUVDENISA β€” reproduction authorised, source acknowledged
NVD (NIST) via fkie-cad/nvd-json-data-feedsPublic domain β€” this product uses data from the NVD API but is not endorsed or certified by the NVD