Skip to content
Fencer Vulns
high 8.4

CVE-2026-40287 json

PraisonAI has RCE via Automatic tools.py Import

published 2026-04-10 6 mo ago modified 2026-10-26 13 d ago also EUVD-2026-22207 , GHSA-g985-wjh9-qxxc , PYSEC-2026-2914 , PYSEC-2026-2947

cvss
8.4
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.2%
EPSS 0.2% chance of exploitation in 30 days, percentile 15%
public exploits
0
none known

Summary

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.

Patch / fix

  • pypi praisonaiagents 1.5.140
  • pypi praisonai 4.5.139
  • praison praisonai 4.5.139
  • praison praisonaiagents 1.5.140

CISA SSVC

Exploitation
Proof of concept is public
Automatable
no
Technical impact
total
Assessed
6 mo ago

Exploit prediction

0.25% chance of exploitation in the next 30 days, higher than 15% of all scored CVEs (FIRST EPSS, 2026-11-08).

Exploits and checks

  • github.com https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-g985-wjh9-qxxc referenced PoC, tagged "exploit" by a source, unverified

CVSS scores

assigned by version score vector
CNA 3.1 8.4 CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
GitHub 3.1 8.4 CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
OSV 3.1 8.4 CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Affected packages

ecosystem package affected fixed in
pypi praisonaiagents
<1.5.140
1.5.140
pypi praisonai
<4.5.139
4.5.139

Affected products

  • MervinPraison PraisonAI
  • MervinPraison praisonaiagents

Classification

Weakness
  • CWE-94 Improper Control of Generation of Code
  • CWE-426 Untrusted Search Path

References

Sources

Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.

CPEs and fixed versions use Anchore's correction of NVD's data: Added CPE configurations because not yet analyzed by NVD.