High

PraisonAI Vulnerable to RCE via Automatic tools.py Import

  • Disclosed: 10.04.2026
  • Updated: 11.10.2026 14:18

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:

python
# tools.py
import os
os.system("echo pwned > /tmp/pwned.txt")

Run any PraisonAI component that loads local tools, for example:

bash
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)

Affected software

Click a technology to see all vulnerabilities affecting it.

PlatformPackageVulnerable versionsFixed in
Python (PyPI) praisonai < 4.5.139 4.5.139
Python (PyPI) praisonaiagents < 1.5.140 1.5.140

References

CVSS score 8.4/10
CVSS vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
Weakness (CWE)
CWE-426, CWE-94
Platform
Python (PyPI)
Package
praisonai, praisonaiagents
Disclosed
10.04.2026
Updated
11.10.2026 14:18

Sources and licenses

OSV / GitHub Advisory Database - PYSEC-2026-2914 - PyPA Advisory Database; CC BY 4.0

OSV / GitHub Advisory Database - GHSA-g985-wjh9-qxxc - CC BY 4.0

OSV / GitHub Advisory Database - PYSEC-2026-2947 - PyPA Advisory Database; CC BY 4.0

Vulnerability history: praisonai

All published vulnerabilities of this package (Python (PyPI)), newest first. Shows whether this is a one-off slip or a package that needs watching.

All (104) in the archive
Total entries
104
First → latest
04.2026 10.2026
Without a fix
0
Exploited in attacks
0

Severity breakdown

  • Critical 27
  • High 60
  • Medium 17

Disclosures per year

  1. 2026: 104
Severity:
  1. PraisonAI Vulnerable to RCE via Automatic tools.py Import this entry
    High · 8.4 CVE-2026-40287 < 4.5.139 4.5.139
  2. High · 7.5 CVE-2026-61439 < 4.6.78 4.6.78
Show more (20) Showing 21 of 87

Know which vulnerabilities affect your application

With the DockRay integration and software inventory enabled, DockRay checks reported component versions against known vulnerabilities and notifies you about confirmed matches. Coverage depends on the supported technology and available advisory data.

Connect your application
DockRay newsletter

Application security in your inbox

Important vulnerabilities, actionable guidance and practical advice for your applications. Choose your technologies and follow what matters to your project.

  • A daily digest of new vulnerabilities, critical ones included.
  • Notifications about important updates.
  • Practical advice on application security and monitoring.

Leave empty to receive updates for every technology.

Free to subscribe. Unsubscribe with one click in any email.