# CVE-2026-40287: PraisonAI has RCE via Automatic tools.py Import

- Severity: High 8.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.26%, higher than 18% of CVEs (2026-12-01)
- Public exploit code or proof of concept: one link below, marked "exploit"
- Published: 2026-04-10T19:32:32.000Z
- Modified: 2026-10-26T22:10:00.163Z
- Also known as: GHSA-g985-wjh9-qxxc, PYSEC-2026-2914, PYSEC-2026-2947
- Weaknesses: CWE-94, CWE-426
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## Description

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.

(As written by CVE List.)

## Affected

- MervinPraison PraisonAI: < 4.5.139
- MervinPraison praisonaiagents: < 1.5.140
- praisonaiagents (PyPI): before 1.5.140
- praisonai (PyPI): before 4.5.139
- praison praisonai: before 4.5.139
- praison praisonaiagents: before 1.5.140

## Every score

- GitHub_M: CVSS:3.1 8.4 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- GitHub: CVSS:3.1 8.4 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`
- PyPA Advisory Database: CVSS:3.1 8.4 High `CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-g985-wjh9-qxxc> (exploit, vendor-advisory, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2026-40287> (advisory)
- <https://github.com/MervinPraison/PraisonAI> (package)
- <https://github.com/MervinPraison/PraisonAI/releases/tag/v4.5.139> (web)
- <https://pypi.org/project/praisonai> (package)
- <https://github.com/advisories/GHSA-g985-wjh9-qxxc> (advisory)
- <https://pypi.org/project/praisonaiagents> (package)

## Sources

- CVE List: [CVE-2026-40287](https://www.cve.org/CVERecord?id=CVE-2026-40287), CVE Terms of Use, modified 2026-04-14
- GitHub Advisory Database: [GHSA-g985-wjh9-qxxc](https://github.com/advisories/GHSA-g985-wjh9-qxxc), CC-BY-4.0, modified 2026-07-13
- NVD: [CVE-2026-40287](https://nvd.nist.gov/vuln/detail/CVE-2026-40287), Public domain, modified 2026-10-26
- PyPA Advisory Database: [PYSEC-2026-2914](https://osv.dev/vulnerability/PYSEC-2026-2914), CC-BY-4.0, modified 2026-07-13
- PyPA Advisory Database: [PYSEC-2026-2947](https://osv.dev/vulnerability/PYSEC-2026-2947), CC-BY-4.0, modified 2026-07-13

---

Page: https://cve.day/CVE-2026-40287 · Whole record: https://cve.day/CVE-2026-40287.json · Rebuilt by cve.day 2026-11-25T22:59:18.669Z
