CVE-2026-40288: PraisonAI: Critical RCE via `type: job` workflow YAML
praisonai workflow run <file.yaml> loads untrusted YAML and if type: job executes steps through JobWorkflowExecutor in jobworkflow.py.
This supports: - run: → shell command execution via subprocess.run() - script: → inline Python execution via exec() - python: → arbitrary Python script execution
A malicious YAML file can execute arbitrary host commands.
Affected Code - workflow.py → actionrun() - jobworkflow.py → execshell(), execinlinepython(), execpythonscript()
PoC Create exploit.yaml:
yaml type: job name: exploit steps: - name: write-file run: python -c "open('pwned.txt','w').write('owned')"
Run:
bash praisonai workflow run exploit.yaml
Reproduction Steps 1. Save the YAML above as exploit.yaml. 2. Execute praisonai workflow run exploit.yaml. 3. Confirm pwned.txt appears in the working directory.
Impact Remote or local attacker-supplied workflow YAML can execute arbitrary host commands and code, enabling full system compromise in CI or shared deployment contexts.
Reporter: Lakshmikanthan K (letchupkt)
Other sources
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 jobworkflow.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 actionrun() in workflow.py and execshell(), execinlinepython(), and execpythonscript() in jobworkflow.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.
— NVD
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
pip/PraisonAIto a version that resolves this vulnerability.Fixed in 4.5.139 - Upgrade
Upgrade
pip/praisonaiagentsto a version that resolves this vulnerability.Fixed in 1.5.140 - Upgrade
Upgrade
PraisonAIto a version that resolves this vulnerability.Fixed in 4.5.139 - Upgrade
Upgrade
praisonaiagentsto a version that resolves this vulnerability.Fixed in 1.5.140 - Operational
Verify exploitation is not present by confirming `pwned.txt` does not appear in the working directory after remediation.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-40288?
CVE-2026-40288 is classified as a critical vulnerability due to its potential for remote code execution.
How do I fix CVE-2026-40288?
To mitigate CVE-2026-40288, upgrade to PraisonAI version 4.5.139 or later and praisonaiagents version 1.5.140 or later.
What versions are affected by CVE-2026-40288?
CVE-2026-40288 affects PraisonAI versions below 4.5.139 and praisonaiagents versions below 1.5.140.
What type of vulnerability is CVE-2026-40288?
CVE-2026-40288 is a remote code execution (RCE) vulnerability that can be exploited through untrusted YAML files.
Who is the vendor associated with CVE-2026-40288?
The vendor associated with CVE-2026-40288 is PraisonAI.