Junglewise Threat Intelligence

CVE-2026-40154: MervinPraison PraisonAI remote code execution via untrusted templates

CVE-2026-40154 · Severity: critical · CVSS 9.3 · Published 2026-04-10

Technologies: praisonai (PyPI). Vendors: MervinPraison, PyPI.

Executive brief

PraisonAI, an AI agent framework, contains a vulnerability that allows malicious templates to execute arbitrary code on a user's machine. When a user downloads and runs a template from an untrusted source like GitHub, the software automatically executes included Python scripts without any security checks or user confirmation. This could allow an attacker to steal sensitive information like API keys, access private files, or gain full control over the user's system.

Technical details

PraisonAI fails to validate the integrity or origin of Python files (such as tools.py) included in remote templates fetched from GitHub. The vulnerability exists in the template registry and tool resolver components, where downloaded files are written to a local cache and subsequently loaded using importlib.util.module_from_spec() and exec_module(). Because there is no code signing verification, checksum validation, or manual user approval before execution, an attacker can distribute malicious templates that execute arbitrary Python code with the privileges of the user running PraisonAI. This can be exploited via template registry poisoning, typosquatting, or account compromise. The issue is addressed in version 4.5.128.

Affected products

  • MervinPraison PraisonAI < 4.5.128

Timeline

  • 2026-04-09: patched: Version 4.5.128 released
  • 2026-04-09: disclosed: NVD publication
  • 2026-04-10: advisory: GitHub Advisory published

References

Related threats