Skip to main content
VulnerabilityPublished Updated

CVE-2026-40156: MervinPraison PraisonAI · Code Injection

Affects MervinPraison PraisonAISource CVE Database V5

0
Compare

Not known to be exploited · CVSS 7.8 High : upgrade to 4.5.128 soon.

Data as of 30 Oct 2026, 11:52 UTC

CVSS 3.1 base score
7.8High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.2% chance of exploitation in 30 days – higher than 11% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 4.5.128
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 10 Apr 2026

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponized: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 30 Oct 2026.

What to do

Upgrade PraisonAI and mervinpraison/PraisonAI to 4.5.128.

Affected software

ProductAffectedFixed in
MervinPraisonPraisonAIAffected
  • <4.5.128
Fixed in
  • 4.5.128
GitHubmervinpraison/PraisonAIpkg:github/mervinpraison/PraisonAIOther threatsAffected
  • <4.5.128
Fixed in
  • 4.5.128

Check your own hosts for these packages with threat-finder (opens in a new tab), our free open-source scanner.

AI-suggested

This vulnerability is fixed in PraisonAI version 4.5.128. Users should upgrade to version 4.5.128 or later to remediate this issue. Until upgrading, ensure that untrusted users cannot place files named tools.py in directories where PraisonAI is executed. Restrict write permissions on working directories and validate the environment before running the software. Patch status is not explicitly confirmed beyond the stated fix in version 4.5.128; users should consult the vendor for official advisories.

Description

PraisonAI is a multi-agent teams system. Prior to 4.5.128, PraisonAI automatically loads a file named tools.py from the current working directory to discover and register custom agent tools. This loading process uses importlib.util.spec_from_file_location and immediately executes module-level code via spec.loader.exec_module() without explicit user consent, validation, or sandboxing. The tools.py file is loaded implicitly, even when it is not referenced in configuration files or explicitly requested by the user. As a result, merely placing a file named tools.py in the working directory is sufficient to trigger code execution. This behavior violates the expected security boundary between user-controlled project files (e.g., YAML configurations) and executable code, as untrusted content in the working directory is treated as trusted and executed automatically. If an attacker can place a malicious tools.py file into a directory where a user or automated system (e.g., CI/CD pipeline) runs praisonai, arbitrary code execution occurs immediately upon startup, before any agent logic begins. This vulnerability is fixed in 4.5.128.

References

Community reviews

Loading reviews…