CVE-2026-40287
JSON

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 packageVersionsReported by
MervinPraison PraisonAI< 4.5.139CVE List
MervinPraison praisonaiagents< 1.5.140CVE List
praisonaiagents (PyPI)before 1.5.140GitHub Advisory Database, PyPA Advisory Database
praisonai (PyPI)before 4.5.139GitHub Advisory Database, PyPA Advisory Database
praison praisonaibefore 4.5.139NVD
praison praisonaiagentsbefore 1.5.140NVD

All scores

GitHub_M8.4high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub8.4high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
PyPA Advisory Database8.4high CVSS:3.1CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Classification

CWE-94CWE-426

SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.

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
  1. Create a malicious tools.py in the current working directory.
  2. Start PraisonAI or invoke a CLI command that loads local tools.
  3. Verify that /tmp/pwned.txt or 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

SourceRecordLicence
CVE ListCVE-2026-40287 changed 2026-04-14CVE Terms of Use
GitHub Advisory DatabaseGHSA-g985-wjh9-qxxc changed 2026-07-13CC-BY-4.0
NVDCVE-2026-40287 changed 2026-10-26Public domain
PyPA Advisory DatabasePYSEC-2026-2914 changed 2026-07-13CC-BY-4.0
PyPA Advisory DatabasePYSEC-2026-2947 changed 2026-07-13CC-BY-4.0