Raw vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:HSummary
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
- 🇪🇺 ENISA EUVD: EUVD-2026-22207
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
CVEs Like This One
Affected Assets
Mitigating Controls
Control response
—
—
—
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.
Preventing execution of unauthorized code directly blocks the malicious binaries that an untrusted search path would load.
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).
Hardened configuration baselines can enforce safe search paths and restrict environment variables that enable the weakness.
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.
Security testing can discover search-path issues but does not itself prevent them in production code.
Restricting software installation reduces the chance that untrusted binaries or libraries are placed in search paths.
Secure architecture principles include hard-coded or validated search paths and avoiding reliance on untrusted directories.
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.
Change-management processes can enforce review of path-handling changes, indirectly lowering risk.
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.