Raw vector
CVSS:3.1/AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:HSummary
CVE-2026-40156 is a high-severity Code Injection (CWE-94) vulnerability in Praison Praisonai. Its CVSS base score is 7.8 (High).
Operationally, exploitation aligns with the MITRE ATT&CK technique Path Interception (T1034); ranked at the 11th percentile by exploit likelihood (below the median); it is not currently listed in the CISA KEV catalog.
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-40156 is a code injection vulnerability in PraisonAI, an open-source multi-agent teams system, affecting versions prior to 4.5.128. The flaw stems from the application's automatic loading of a file named tools.py from the current working directory to discover and register custom agent tools. This process employs importlib.util.spec_from_file_location followed by spec.loader.exec_module() to execute module-level code without user consent, validation, or sandboxing. The file is loaded implicitly, regardless of whether it is referenced in configuration files or explicitly requested, treating potentially untrusted content in the working directory as executable code and violating expected security boundaries.
An attacker with local access to the filesystem can exploit this vulnerability by placing a malicious tools.py file in the current working directory used by PraisonAI. Exploitation requires low complexity and no privileges (PR:N), but user interaction is needed (UI:R), such as a user or automated system like a CI/CD pipeline running the application from the compromised directory. Successful exploitation triggers arbitrary code execution immediately upon startup, before any agent logic executes, granting high confidentiality, integrity, and availability impacts (CVSS 7.8: AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H). The issue maps to CWEs-94 (code injection), CWE-426 (untrusted search path), and CWE-829 (file inclusion).
The vulnerability is addressed in PraisonAI version 4.5.128, as detailed in the GitHub security advisory (GHSA-2g3w-cpc4-chr4). Security practitioners should upgrade to the patched version and review working directories for unauthorized tools.py files, particularly in AI/ML development environments where multi-agent systems like PraisonAI are deployed.
OWASP Top 10 for Web (2025)
EU & UK References
- 🇪🇺 ENISA EUVD: EUVD-2026-21508
Vulnerability Data
PraisonAI is a multi-agent teams system. Prior to 4.5.128, PraisonAI automatically loads a file named tools.py from the current working directory to discover and register custom agent tools. This loading process uses importlib.util.spec_from_file_location and immediately executes module-level code via spec.loader.exec_module()…
more
without explicit user consent, validation, or sandboxing. The tools.py file is loaded implicitly, even when it is not referenced in configuration files or explicitly requested by the user. As a result, merely placing a file named tools.py in the working directory is sufficient to trigger code execution. This behavior violates the expected security boundary between user-controlled project files (e.g., YAML configurations) and executable code, as untrusted content in the working directory is treated as trusted and executed automatically. If an attacker can place a malicious tools.py file into a directory where a user or automated system (e.g., CI/CD pipeline) runs praisonai, arbitrary code execution occurs immediately upon startup, before any agent logic begins. This vulnerability is fixed in 4.5.128.
- CWE(s)
Related Threats
MITRE ATT&CK Enterprise Techniques
CVEs Like This One
Affected Assets
Mitigating Controls
Control response
—
—
- 6 hardening rules · 6 OS baselines
V14.2.3V3.5.6V9.1.3V15.3.2
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.
Requires documented, valid provenance for components, preventing acceptance of code from outside the trusted sphere.
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.
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.
Pre-acquisition integrity/authenticity checks directly prevent inclusion of untrusted code.
Preventing execution of unauthorized code directly blocks the malicious binaries that an untrusted search path would load.
Supply-chain program directly governs inclusion of third-party executable code.
Contractual requirements can mandate trusted sources and integrity checks for included functionality.
Supplier risk assessment explicitly covers risks from their products and libraries.
Critical-supplier assessment reduces risk of importing executable functionality from untrusted parties.
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.
By requiring suppliers to propagate security requirements and to disclose component provenance, the control limits the inclusion of functionality obtained from untrusted third-party sources without oversight.
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.
Blocking domains that serve malware or untrusted scripts prevents the browser from automatically including functionality from an attacker-controlled source.
Hardening callouts derived
Configuration rules from DISA STIG baselines that bear on weaknesses of the type cited by this CVE. Each rule is shown with the relationship its mapping actually records, against the CWE it was authored against. Derived via CVE→CWE over `controls_xwalks` (authoritative rows only; rows rated `none` are excluded).
Oracle Linux 8 (1 rule)
- V-248635 Executable search paths within the initialization files of all local interactive OL 8 users must only contain paths that resolve to the system default or the user's home directory. prevents CWE-829
Oracle Linux 9 (1 rule)
- V-271847 OL 9 must be configured so that executable search paths within the initialization files of all local interactive users must only contain paths that resolve to the system default or the users home directory. prevents CWE-829
RHEL 7 (1 rule)
- V-204477 The Red Hat Enterprise Linux operating system must be configured so that all local interactive user initialization files executable search paths contain only paths that resolve to the users home directory. prevents CWE-829
RHEL 8 (1 rule)
- V-230317 Executable search paths within the initialization files of all local interactive RHEL 8 users must only contain paths that resolve to the system default or the users home directory. prevents CWE-829
RHEL 9 (1 rule)
- V-258050 Executable search paths within the initialization files of all local interactive RHEL 9 users must only contain paths that resolve to the system default or the users home directory. prevents CWE-829
Windows 10 (1 rule)
- V-220737 Administrative accounts must not be used with applications that access the Internet, such as web browsers, or with potential Internet sources, such as email. prevents CWE-829