---
id: "CVE-2026-40288"
page: "https://infrastack.ai/live/CVE-2026-40288"
kind: "vulnerability"
aliases: ["CVE-2026-40288", "GHSA-vc46-vw85-3wvm"]
title: "PraisonAI has critical RCE via `type: job` workflow YAML"
severity: "critical"
cvss: 9.8
epss: 0.00619
exploited: false
status: "open"
category: "ai-tooling"
products: [{"name": "praisonaiagents", "fixed": ["1.5.140"], "affected": "<= 1.5.139", "ecosystem": "pypi"}, {"name": "PraisonAI", "fixed": ["4.5.139"], "affected": "<= 4.5.138", "ecosystem": "pypi"}, {"name": "praison praisonai", "fixed": ["4.5.139"], "affected": "< 4.5.139", "ecosystem": "vendor"}, {"name": "praison praisonaiagents", "fixed": ["1.5.140"], "affected": "< 1.5.140", "ecosystem": "vendor"}, {"via": "cpe", "name": "PraisonAI", "fixed": ["4.5.139"], "affected": "< 4.5.139", "ecosystem": "pypi"}, {"via": "cpe", "name": "praisonaiagents", "fixed": ["1.5.140"], "affected": "< 1.5.140", "ecosystem": "pypi"}]
ecosystems: ["pypi", "vendor"]
tags: ["ai-agents", "ai-tooling", "ci", "cwe-78", "cwe-94", "praisonai", "praisonaiagents", "python"]
not_affected_if: ["fixed-version", "trusted-workflows-only"]
published_at: "2026-04-10T19:32:48+00:00"
first_seen_at: "2026-11-16T15:58:20+00:00"
updated_at: "2026-11-16T16:08:50+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-vc46-vw85-3wvm", "first_seen_at": "2026-11-16T15:58:20+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-40288", "first_seen_at": "2026-11-16T16:08:50+00:00"}]
exploit_sources: [{"type": "epss", "score": 0.00619, "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-40288"}]
---

# PraisonAI has critical RCE via `type: job` workflow YAML

Link for people: https://infrastack.ai/live/CVE-2026-40288 (this .md is for agents)

PraisonAI's `praisonai workflow run` command executes the steps of a `type: job` workflow file, including `run:`, `script:` and `python:` steps, without checking what they contain. A malicious YAML file lets an attacker run arbitrary shell commands and Python code on the host that runs the workflow.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:praisonaiagents affected <= 1.5.139 fixed 1.5.140
- pypi:PraisonAI affected <= 4.5.138 fixed 4.5.139
- vendor:praison praisonai affected < 4.5.139 fixed 4.5.139
- vendor:praison praisonaiagents affected < 1.5.140 fixed 1.5.140
- pypi:PraisonAI affected < 4.5.139 fixed 4.5.139
- pypi:praisonaiagents affected < 1.5.140 fixed 1.5.140

## How to check

- Check the installed version: `pip show praisonai` and `pip show praisonaiagents`
- Look for any use of `praisonai workflow run` on workflow files from outside your team, such as CI pipelines that take YAML from pull requests or shared deployments
- Find `type: job` in workflow files you accept from untrusted sources

## Fix

- `praisonai` fixed in `4.5.139` (affected up to `4.5.138`)
- `praisonaiagents` fixed in `1.5.140` (affected up to `1.5.139`)

## Timeline

- 2026-11-16T15:58:20+00:00 ghsa https://github.com/advisories/GHSA-vc46-vw85-3wvm
- 2026-11-16T16:08:50+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-40288

## Documents

- [advisory] Maintainer's advisory: api.github.com https://api.github.com/repos/MervinPraison/PraisonAI/security-advisories/GHSA-vc46-vw85-3wvm
- [advisory] Maintainer's advisory: github.com https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-vc46-vw85-3wvm
- [fix] Release: github.com https://github.com/MervinPraison/PraisonAI/releases/tag/v4.5.139

## From the sources

`praisonai workflow run <file.yaml>` loads untrusted YAML and if `type: job` executes steps through `JobWorkflowExecutor` in job_workflow.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 → `action_run()`
- job_workflow.py → `_exec_shell()`, `_exec_inline_python()`, `_exec_python_script()`

### 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)

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
