Advisory Database
  • Advisories
  • Dependency Scanning
  1. pypi
  2. ›
  3. praisonai
  4. ›
  5. CVE-2026-40287

CVE-2026-40287: PraisonAI Vulnerable to RCE via Automatic tools.py Import

April 10, 2026 (updated April 14, 2026)

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.

References

  • github.com/MervinPraison/PraisonAI
  • github.com/MervinPraison/PraisonAI/releases/tag/v4.5.139
  • github.com/MervinPraison/PraisonAI/security/advisories/GHSA-g985-wjh9-qxxc
  • github.com/advisories/GHSA-g985-wjh9-qxxc
  • nvd.nist.gov/vuln/detail/CVE-2026-40287

Code Behaviors & Features

Detect and mitigate CVE-2026-40287 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 4.5.139

Fixed versions

  • 4.5.139

Solution

Upgrade to version 4.5.139 or above.

Impact 8.4 HIGH

CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H

Learn more about CVSS

Weakness

  • CWE-426: Untrusted Search Path
  • CWE-94: Improper Control of Generation of Code ('Code Injection')

Source file

pypi/praisonai/CVE-2026-40287.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Sat, 09 May 2026 12:18:43 +0000.