Quick answers
- Is CVE-2026-40287 exploited in the wild?
- No. Junglewise Threat Intelligence has no report of CVE-2026-40287 being exploited in the wild.
- How severe is CVE-2026-40287?
- High severity, with a CVSS score of 8.4, published 14 April 2026.
- Which products and versions are affected?
- praisonai (PyPI) ECOSYSTEM:introduced=0,fixed=4.5.139; praisonaiagents (PyPI) ECOSYSTEM:introduced=0,fixed=1.5.140.
- Is there a fix for CVE-2026-40287?
- Yes. praisonai (PyPI): upgrade to 4.5.139 or later; praisonaiagents (PyPI): upgrade to 1.5.140 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.
- How is CVE-2026-40287 attacked?
- It is attacked with local access, in a software library.
- Am I affected by CVE-2026-40287?
- Check whether you run Praisonai, Praisonaiagents, praisonai (PyPI) or one of the others listed at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.
How to fix
- praisonai (PyPI): upgrade to 4.5.139 or later
pip install "praisonai>=4.5.139" - praisonaiagents (PyPI): upgrade to 1.5.140 or later
pip install "praisonaiagents>=1.5.140"
Technical details
PraisonAI and praisonaiagents are vulnerable to arbitrary code execution via an untrusted search path (CWE-426) and code injection (CWE-94). The application automatically calls import_tools_from_file() and _load_local_tools() upon startup, which attempts to import a file named tools.py from the current working directory (./tools.py). An attacker with the ability to place a file in the process's working directory can achieve full code execution in the context of the PraisonAI process. This affects CLI tool-loading paths and workflow execution. The issue is fixed in PraisonAI version 4.5.139 and praisonaiagents version 1.5.140.
Affected products
- MervinPraison PraisonAI <= 4.5.138
- MervinPraison praisonaiagents <= 1.5.139
Identifiers
- CVE-2026-40287
- GHSA-g985-wjh9-qxxc
- PYSEC-2026-2914
- PYSEC-2026-2947
Timeline
- 2026-04-10: disclosed
- 2026-04-10: advisory
- 2026-04-10: patched: Fixed in PraisonAI 4.5.139 and praisonaiagents 1.5.140