CVE-2026-40288: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in MervinPraison PraisonAI
PraisonAI is a multi-agent teams system. In versions below 4.5.139 of PraisonAI and 1.5.140 of praisonaiagents, the workflow engine is vulnerable to arbitrary command and code execution through untrusted YAML files. When praisonai workflow run <file.yaml> loads a YAML file with type: job, the JobWorkflowExecutor in job_workflow.py processes steps that support run: (shell commands via subprocess.run()), script: (inline Python via exec()), and python: (arbitrary Python script execution)—all without any validation, sandboxing, or user confirmation. The affected code paths include action_run() in workflow.py and _exec_shell(), _exec_inline_python(), and _exec_python_script() in job_workflow.py. An attacker who can supply or influence a workflow YAML file (particularly in CI pipelines, shared repositories, or multi-tenant deployment environments) can achieve full arbitrary command execution on the host system, compromising the machine and any accessible data or credentials. This issue has been fixed in versions 4.5.139 of PraisonAI and 1.5.140 of praisonaiagents.
AI Analysis
Technical Summary
The vulnerability in PraisonAI affects the workflow engine's handling of YAML files with type: job. Specifically, the JobWorkflowExecutor processes steps that execute shell commands (via subprocess.run()), inline Python code (via exec()), and arbitrary Python scripts without any input validation, sandboxing, or user confirmation. The affected functions include action_run() in workflow.py and _exec_shell(), _exec_inline_python(), and _exec_python_script() in job_workflow.py. An attacker able to supply or influence these YAML workflow files—such as in CI pipelines, shared repositories, or multi-tenant environments—can achieve arbitrary command execution on the host system. This vulnerability is tracked as CVE-2026-40288 and has a CVSS v3.1 base score of 9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H). The issue is resolved in PraisonAI version 4.5.139 and praisonaiagents version 1.5.140.
Potential Impact
Successful exploitation allows an unauthenticated attacker who can supply or influence a workflow YAML file to execute arbitrary shell commands and Python code on the host system. This leads to full system compromise, including confidentiality, integrity, and availability impacts. The attacker can access or modify data, credentials, and potentially control the entire affected host.
Mitigation Recommendations
A fixed version is available: upgrade PraisonAI to version 4.5.139 or later and praisonaiagents to version 1.5.140 or later. These versions address the vulnerability by implementing necessary validation and sandboxing. Until upgrading, restrict access to workflow YAML files and avoid running untrusted workflows. Patch status is confirmed by the vendor advisory indicating the fix in the specified versions.
CVE-2026-40288: CWE-78: Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection') in MervinPraison PraisonAI
Description
PraisonAI is a multi-agent teams system. In versions below 4.5.139 of PraisonAI and 1.5.140 of praisonaiagents, the workflow engine is vulnerable to arbitrary command and code execution through untrusted YAML files. When praisonai workflow run <file.yaml> loads a YAML file with type: job, the JobWorkflowExecutor in job_workflow.py processes steps that support run: (shell commands via subprocess.run()), script: (inline Python via exec()), and python: (arbitrary Python script execution)—all without any validation, sandboxing, or user confirmation. The affected code paths include action_run() in workflow.py and _exec_shell(), _exec_inline_python(), and _exec_python_script() in job_workflow.py. An attacker who can supply or influence a workflow YAML file (particularly in CI pipelines, shared repositories, or multi-tenant deployment environments) can achieve full arbitrary command execution on the host system, compromising the machine and any accessible data or credentials. This issue has been fixed in versions 4.5.139 of PraisonAI and 1.5.140 of praisonaiagents.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in PraisonAI affects the workflow engine's handling of YAML files with type: job. Specifically, the JobWorkflowExecutor processes steps that execute shell commands (via subprocess.run()), inline Python code (via exec()), and arbitrary Python scripts without any input validation, sandboxing, or user confirmation. The affected functions include action_run() in workflow.py and _exec_shell(), _exec_inline_python(), and _exec_python_script() in job_workflow.py. An attacker able to supply or influence these YAML workflow files—such as in CI pipelines, shared repositories, or multi-tenant environments—can achieve arbitrary command execution on the host system. This vulnerability is tracked as CVE-2026-40288 and has a CVSS v3.1 base score of 9.8 (AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H). The issue is resolved in PraisonAI version 4.5.139 and praisonaiagents version 1.5.140.
Potential Impact
Successful exploitation allows an unauthenticated attacker who can supply or influence a workflow YAML file to execute arbitrary shell commands and Python code on the host system. This leads to full system compromise, including confidentiality, integrity, and availability impacts. The attacker can access or modify data, credentials, and potentially control the entire affected host.
Mitigation Recommendations
A fixed version is available: upgrade PraisonAI to version 4.5.139 or later and praisonaiagents to version 1.5.140 or later. These versions address the vulnerability by implementing necessary validation and sandboxing. Until upgrading, restrict access to workflow YAML files and avoid running untrusted workflows. Patch status is confirmed by the vendor advisory indicating the fix in the specified versions.
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: 69ddbc3182d89c981fc24dcf
Added to database: 4/14/2026, 4:01:53 AM
Last enriched: 4/14/2026, 4:17:08 AM
Last updated: 4/14/2026, 3:33:50 PM
Views: 10
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.