cve.bz

CVE-2026-40287 praison: Code Injection

8.4 highExploit referenceEPSS 0.3%Fix available

High (8.4) in praison. EPSS 0.3% estimated probability of exploitation activity in the next 30 days. Fixed in praisonaiagents 1.5.140.

On this page
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.

Severity

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
EPSS
0.3% (unchanged from 0.3% a week ago; 0.2% 30 days ago) estimated probability of exploitation activity in the next 30 days; 17th percentile. Scored 2026-11-22. A forecast for this CVE across the internet, not for your own systems.
CISA's assessment (SSVC)
Exploitation: PoC · Automatable: no · Technical impact: total, assessed 2026-04-14. From CISA's Vulnrichment in the CVE List: whether it is exploited, whether exploiting it can be automated, and how much control it gives.
CWEs
CWE-94 Improper Control of Generation of Code (Code Injection)
CWE-426 Untrusted Search Path
OWASP Top 10
A05:2025 Injection, A08:2025 Software or Data Integrity Failures
Published
Modified
NVD analysis
Analyzed
Record from
the NVD, synced

Fix and patched versions

Ask an AI about this CVE

Show the promptExplain CVE-2026-40287 for an engineer deciding whether to act. Use https://cve.bz/api/public/cves/CVE-2026-40287?via=ask-ai-copy and https://cve.bz/cve/CVE-2026-40287?via=ask-ai-copy as the source of truth: what is affected and which versions fix it, whether it is in CISA KEV, public exploits, and its EPSS (an internet-wide 30-day estimate of exploitation activity, not a forecast for my systems). If they give no fixed versions, use the CVE record https://cveawg.mitre.org/api/cve/CVE-2026-40287 or the vendor advisory, not third-party mirrors. Tell me how to check whether I am affected and how to verify a fix. Cite the sources and say where they are uncertain.

Opens a third-party assistant; its answer is its own, not cve.bz's. The prompt holds only this CVE's id and public links.

Affected

Versions

From the NVD's CPE matches.

ProductAffected
praison:praisonaibefore 4.5.139
praison:praisonaiagentsbefore 1.5.140

Packages (OSV)

AdvisoryEcosystemPackageAffectedFixed in
GHSA-g985-wjh9-qxxcPyPIpraisonaiagents<1.5.1401.5.140
GHSA-g985-wjh9-qxxcPyPIpraisonai<4.5.1394.5.139
PYSEC-2026-2914PyPIpraisonai<4.5.1394.5.139
PYSEC-2026-2947PyPIpraisonaiagents<1.5.1401.5.140

Attack patterns (CAPEC)

  • CAPEC-38 Leveraging/Manipulating Configuration File Search Paths Likelihood: High · Severity: Very High
  • CAPEC-35 Leverage Executable Code in Non-Executable Files Likelihood: High · Severity: Very High
  • CAPEC-77 Manipulating User-Controlled Variables Likelihood: High · Severity: Very High
  • CAPEC-242 Code Injection Likelihood: High · Severity: High

The attack patterns MITRE's CAPEC relates to this record's weaknesses, as MITRE names them. Credits.

References

Check your stackJSON