8.4high
PraisonAI has RCE via Automatic tools.py Import
- Severity
- 8.4high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.26% (higher than 18% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-g985-wjh9-qxxcPYSEC-2026-2914PYSEC-2026-2947
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
| Product or package | Versions | Reported by |
|---|---|---|
| MervinPraison PraisonAI | < 4.5.139 | CVE List |
| MervinPraison praisonaiagents | < 1.5.140 | CVE List |
| praisonaiagents (PyPI) | before 1.5.140 | GitHub Advisory Database, PyPA Advisory Database |
| praisonai (PyPI) | before 4.5.139 | GitHub Advisory Database, PyPA Advisory Database |
| praison praisonai | before 4.5.139 | NVD |
| praison praisonaiagents | before 1.5.140 | NVD |
All scores
| GitHub_M | 8.4high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| GitHub | 8.4high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
| PyPA Advisory Database | 8.4high CVSS:3.1 | CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
Classification
What each source says
CVE List
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.
GitHub Advisory Database
PraisonAI automatically imports ./tools.py from the current working directory when launching certain components. This includes call.py, tool_resolver.py, and CLI tool-loading paths.
A malicious tools.py placed in the process working directory is executed immediately, allowing arbitrary Python code execution in the host environment.
Affected Code
- call.py →
import_tools_from_file() - tool_resolver.py →
_load_local_tools() - tools.py → local tool import flow
PoC
Create tools.py in the directory where PraisonAI is launched:
# tools.py
import os
os.system("echo pwned > /tmp/pwned.txt")
Run any PraisonAI component that loads local tools, for example:
praisonai workflow run safe.yaml
Reproduction Steps
- Create a malicious tools.py in the current working directory.
- Start PraisonAI or invoke a CLI command that loads local tools.
- Verify that
/tmp/pwned.txtor the malicious command output exists.
Impact
An attacker who can place or influence tools.py in the working directory can execute arbitrary code in the PraisonAI process, compromising the host and any connected data.
Reporter: Lakshmikanthan K (letchupkt)
NVD (es)
PraisonAI es un sistema de equipos multiagente. Las versiones 4.5.138 e inferiores son vulnerables a la ejecución de código arbitrario mediante la importación automática y no saneada de un archivo tools.py desde el directorio de trabajo actual. Componentes que incluyen call.py (import_tools_from_file()), tool_resolver.py (_load_local_tools()) y las rutas de carga de herramientas de la CLI importan ciegamente ./tools.py al inicio sin ninguna validación, sandboxing o confirmación del usuario. Un atacante que puede colocar un archivo tools.py malicioso en el directorio donde se inicia PraisonAI (como a través de un proyecto compartido, un repositorio clonado o un espacio de trabajo escribible) logra la ejecución inmediata de código Python arbitrario en el entorno del host. Esto compromete el proceso completo de PraisonAI, el sistema host y cualquier dato o credencial conectado. Este problema ha sido solucionado en la versión 4.5.139.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2026-40287 changed 2026-04-14 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-g985-wjh9-qxxc changed 2026-07-13 | CC-BY-4.0 |
| NVD | CVE-2026-40287 changed 2026-10-26 | Public domain |
| PyPA Advisory Database | PYSEC-2026-2914 changed 2026-07-13 | CC-BY-4.0 |
| PyPA Advisory Database | PYSEC-2026-2947 changed 2026-07-13 | CC-BY-4.0 |