Vulnerability · Published Apr 14, 2026 · Assigned by GitHub_M
CVE-2026-40287PraisonAI has RCE via Automatic tools.py Import
High 8.4
In plain English
A high-severity code injection in PraisonAI from MervinPraison. Proof-of-concept exploit code is public. The chance it is exploited in the next 30 days is estimated at 0.2% (higher than 16% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.
Official description
PraisonAI is a multi-agent teams system. Versions 4.5.138 and below are vulnerable to arbitrary code execution through automatic, unsanitized import of a tools.py file from the current working directory. Components including call.py (import_tools_from_file()), tool_resolver.py (_load_local_tools()), and CLI tool-loading paths blindly import ./tools.py at startup without any validation, sandboxing, or user confirmation. An attacker who can place a malicious tools.py in the directory where PraisonAI is launched (such as through a shared project, cloned repository, or writable workspace) achieves immediate arbitrary Python code execution in the host environment. This compromises the full PraisonAI process, the host system, and any connected data or credentials. This issue has been fixed in version 4.5.139.
Affected packages & fixed versions
| Ecosystem | Package | Fixed in | Advisory |
|---|---|---|---|
| PyPI | praisonai | 4.5.139 | GHSA-g985-wjh9-qxxc |
| PyPI | praisonai | 4.5.139 | PYSEC-2026-2914 |
| PyPI | praisonaiagents | 1.5.140 | GHSA-g985-wjh9-qxxc |
| PyPI | praisonaiagents | 1.5.140 | PYSEC-2026-2947 |
Affected products (as reported)
| Vendor | Product | Versions |
|---|---|---|
| MervinPraison | PraisonAI | < 4.5.139 |
| MervinPraison | praisonaiagents | < 1.5.140 |
Weakness: CWE-94, CWE-426 · Vector: CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H