Cyber Resilience

CVE-2026-40287

LPE in Praisonai ≤ 4.5.139

Public PoCLPE
Published
14 April 2026
Modified
20 April 2026
Patch / advisory
CVSS Score v3.1 8.4
Click a component to see what it means
Raw vectorCVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Score 0.0025 16th percentile
Risk Priority 60 floored blend · peak EPSS

Summary

CVE-2026-40287 is a high-severity Code Injection (CWE-94) vulnerability in Praison Praisonai. Its CVSS base score is 8.4 (High).

Operationally, exploitation aligns with the MITRE ATT&CK technique Path Interception (T1034); ranked at the 16th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog; a public proof-of-concept is referenced.

The strongest mitigations our analysis identified map to CM-6 (Configuration Settings) and SA-11 (Developer Testing and Evaluation) — see the control section below for these in your framework.

Deeper analysis AI-assisted summary

Synthesised by an AI model from the NVD description and linked references — a reading aid, not an authoritative source.

CVE-2026-40287 is an arbitrary code execution vulnerability in PraisonAI, a multi-agent teams system. Versions 4.5.138 and prior are affected due to automatic, unsanitized import of a tools.py file from the current working directory at startup. Specific components involved include call.py (import_tools_from_file()), tool_resolver.py (_load_local_tools()), and CLI tool-loading paths, which perform the import without validation, sandboxing, or user confirmation. The issue is rated with a CVSS v3.1 base score of 8.4 (AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H) and is associated with CWE-94 (Improper Control of Generation of Code) and CWE-426 (Untrusted Search Path).

An attacker can exploit this vulnerability by placing a malicious tools.py file in the directory from which PraisonAI is launched, such as through a shared project, cloned repository, or writable workspace. No privileges or user interaction are required beyond local access to write the file. Successful exploitation results in immediate arbitrary Python code execution within the host environment, fully compromising the PraisonAI process, the host system, and any connected data or credentials.

The GitHub security advisory (GHSA-g985-wjh9-qxxc) confirms the issue has been fixed in PraisonAI version 4.5.139. Security practitioners should upgrade to this version or later and audit launch directories for unauthorized tools.py files.

PraisonAI's role as a multi-agent system introduces AI/ML relevance, as exploitation could manipulate agent behaviors or exfiltrate training data or models from compromised environments. No real-world exploitation has been reported as of the CVE publication on 2026-04-14.

OWASP Top 10 for Web (2025)

EU & UK References

Vulnerability Data

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…

more

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.

CWE(s)

Related Threats

MITRE ATT&CK Enterprise Techniques

T1034 Path Interception Persistence
**This technique has been deprecated.
T1574 Hijack Execution Flow Stealth
Adversaries may execute their own malicious payloads by hijacking the way operating systems run programs.
T1574.001 DLL Stealth
Adversaries may abuse dynamic-link library files (DLLs) in order to achieve persistence, escalate privileges, and evade defenses.
T1574.008 Path Interception by Search Order Hijacking Stealth
Adversaries may execute their own malicious payloads by hijacking the search order used to load other programs.
T1059 Command and Scripting Interpreter Execution
Adversaries may abuse command and script interpreters to execute commands, scripts, or binaries.
T1059.001 PowerShell Execution
Adversaries may abuse PowerShell commands and scripts for execution.
Derived from this CVE’s CWE(s) via the direct CWE→ATT&CK cross-walk.

CVEs Like This One

CVE-2026-40288Same product: Praison Praisonai
CVE-2026-40156Same product: Praison Praisonai
CVE-2026-39891Same product: Praison Praisonai
CVE-2026-44334Same product: Praison Praisonai
CVE-2026-40158Same product: Praison Praisonai
CVE-2026-44336Same product: Praison Praisonai
CVE-2023-27770Shared CWE-426, CWE-94
CVE-2026-55522Shared CWE-426, CWE-94
CVE-2023-35897Shared CWE-94
CVE-2026-1340Shared CWE-94

Affected Assets

praison
praisonai
≤ 4.5.139
praison
praisonaiagents
≤ 1.5.140

Mitigating Controls

Control response

Prevent
Stop it (NIST 800-53)

Detect
Catch it (NIST detect / respond)

Harden
Shrink the surface (DISA STIG)

Validate
Prove the fix (OWASP ASVS)
  • V1.3.1

Mitigating Controls (NIST 800-53 r5) AI

Secure baseline settings can enforce absolute, organization-controlled paths for critical resources.

Developer testing and evaluation finds code paths that accept and execute externally influenced strings.

Input validation directly stops untrusted data from being used to construct executable code without neutralization.

Least privilege limits the damage an injected code fragment can perform once executed.

Least-functionality configuration can prohibit unapproved directories or executables from being reachable via search paths.

Requiring documented secure development standards and tools enforces use of safe code-generation APIs and escaping.

Mitigating Controls (NIST CSF 2.0) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→CSF cross-walk (authority under review) — links open the control.

PR.PS-05 full match
prevents

Preventing execution of unauthorized code directly blocks the malicious binaries that an untrusted search path would load.

PR.PS-06 mostly match
prevents

PR.PS-06's SDLC practices directly target injection flaws via secure coding and testing (mostly), yet as a single broad outcome it leaves many code-generation specifics unaddressed (partial).

PR.PS-01 partial match
prevents

Hardened configuration baselines can enforce safe search paths and restrict environment variables that enable the weakness.

PR.DS-10 none match
prevents

PR.DS-10 protects runtime data confidentiality/integrity but has no bearing on neutralizing externally influenced input during code generation, so neither direction shows any preventive effect.

Mitigating Controls (ISO/IEC 27001:2022 Annex A) AI

Derived directly from the weakness types (CWEs) cited in the NVD entry via our AI-authored CWE→ISO cross-walk (authority under review) — links open the control.

finds

Security testing can discover search-path issues but does not itself prevent them in production code.

degrades

Restricting software installation reduces the chance that untrusted binaries or libraries are placed in search paths.

prevents

Secure architecture principles include hard-coded or validated search paths and avoiding reliance on untrusted directories.

prevents

Banning unapproved code samples and unauthenticated web services, combined with secure-coding standards and SAST, prevents the dynamic generation or inclusion of attacker-supplied code.

none

Change-management processes can enforce review of path-handling changes, indirectly lowering risk.

none

Controls that restrict unauthorized or malicious code from being introduced via external networks or removable media limit opportunities for an attacker to inject and execute arbitrary code.

References