CVE-2026-40287: CWE-94: Improper Control of Generation of Code ('Code Injection') in MervinPraison PraisonAI
PraisonAI versions 4. 5. 138 and earlier are vulnerable to arbitrary code execution due to automatic, unsanitized import of a local tools. py file at startup. This allows an attacker with write access to the working directory to execute arbitrary Python code within the PraisonAI process and potentially compromise the host system and connected data. The vulnerability is fixed in version 4. 5. 139.
AI Analysis
Technical Summary
PraisonAI, a multi-agent teams system, versions 4.5.138 and below, improperly import a tools.py file from the current working directory without validation, sandboxing, or user confirmation. This occurs in components such as call.py (import_tools_from_file()), tool_resolver.py (_load_local_tools()), and CLI tool-loading paths. An attacker able to place a malicious tools.py file in the launch directory can achieve immediate arbitrary Python code execution, compromising the PraisonAI process, the host system, and any connected data or credentials. The issue is addressed in version 4.5.139.
Potential Impact
Successful exploitation results in full arbitrary code execution within the PraisonAI process context, leading to complete compromise of the host system and any data or credentials accessible to the process. The vulnerability has a CVSS 3.1 score of 8.4 (high severity), reflecting its potential for high confidentiality, integrity, and availability impact.
Mitigation Recommendations
Upgrade PraisonAI to version 4.5.139 or later, where this vulnerability is fixed. Until upgrading, ensure that untrusted users cannot place or modify files in the directory where PraisonAI is launched to prevent malicious tools.py injection.
CVE-2026-40287: CWE-94: Improper Control of Generation of Code ('Code Injection') in MervinPraison PraisonAI
Description
PraisonAI versions 4. 5. 138 and earlier are vulnerable to arbitrary code execution due to automatic, unsanitized import of a local tools. py file at startup. This allows an attacker with write access to the working directory to execute arbitrary Python code within the PraisonAI process and potentially compromise the host system and connected data. The vulnerability is fixed in version 4. 5. 139.
CVSS v3.1
Score 8.4high
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
PraisonAI, a multi-agent teams system, versions 4.5.138 and below, improperly import a tools.py file from the current working directory without validation, sandboxing, or user confirmation. This occurs in components such as call.py (import_tools_from_file()), tool_resolver.py (_load_local_tools()), and CLI tool-loading paths. An attacker able to place a malicious tools.py file in the launch directory can achieve immediate arbitrary Python code execution, compromising the PraisonAI process, the host system, and any connected data or credentials. The issue is addressed in version 4.5.139.
Potential Impact
Successful exploitation results in full arbitrary code execution within the PraisonAI process context, leading to complete compromise of the host system and any data or credentials accessible to the process. The vulnerability has a CVSS 3.1 score of 8.4 (high severity), reflecting its potential for high confidentiality, integrity, and availability impact.
Mitigation Recommendations
Upgrade PraisonAI to version 4.5.139 or later, where this vulnerability is fixed. Until upgrading, ensure that untrusted users cannot place or modify files in the directory where PraisonAI is launched to prevent malicious tools.py injection.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- GitHub_M
- Date Reserved
- 2026-04-10T20:22:44.035Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 69ddbc3182d89c981fc24dcc
Added to database: 4/14/2026, 4:01:53 AM
Last enriched: 4/21/2026, 6:27:25 AM
Last updated: 5/31/2026, 12:03:32 AM
Views: 60
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
External Links
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.