Skip to content

AAK-PRAISONAI-CVE-2026-61438-001: PraisonAI 4.6.78 and later: a job workflow's inline Python step gets out of the executor's AST sandbox (no fixed release)

Severity
HIGH
Category
Supply Chain (supply-chain)
Scanner
agent_audit_kit/scanners/mcp_cve_pins_2026_07.py
Auto-fixable
No.
SARIF name
PraisonAiJobWorkflowSandboxEscape

What it detects

PraisonAI (PyPI praisonai, MervinPraison/PraisonAI) runs the inline script: steps of a type: job YAML workflow through JobWorkflowExecutor._exec_inline_python once PRAISONAI_ALLOW_JOB_WORKFLOWS=true is set. The function checks the step's AST against an allowlist of node types and imported module names, then runs it with a reduced set of builtins, and the check falls short twice: the import allowlist holds os, and attribute access passes with no check on the attribute's name, so a step walks from an allowed builtin to the builtins module and from there to os. Whoever writes or changes a workflow file that a user or a CI job runs gets commands run with that process's privileges (CVE-2026-61438, CVSS 3.1 7.3, GHSA-26mh-57q7-jfvr). The advisory's own proof, a plain import os statement, fails when it runs, since the reduced builtins lack __import__; the attribute route does not need it. The advisory names 4.6.78 as the fix, but PyPI has no 4.6.78 and no later release changes the function: it is byte-identical in every praisonai wheel from 4.6.81 to 4.6.102 and, from 4.6.103 to 4.7.24 (2026-11-05), in every release of praisonai-code (0.0.1 to 0.1.21), which praisonai requires from 4.6.103 and loads the executor from. Releases below 4.6.78 are reported for this CVE by the 4.6.78 PraisonAI rule, so this one starts at 4.6.78 and each release is reported for it once.

How to fix

No release fixes this, so an upgrade does not help. Leave PRAISONAI_ALLOW_JOB_WORKFLOWS unset, which keeps PraisonAI from running job and hybrid workflows at all, unless every such workflow file it runs is written and reviewed by people you trust; never set it in a CI job that runs workflow files from pull requests, templates or generated output. Watch MervinPraison/PraisonAI#6368, which blocks attribute names that start with _, and pin the first praisonai and praisonai-code releases that ship a fix.

To confirm the finding is gone, report only this rule:

agent-audit-kit scan . --rules AAK-PRAISONAI-CVE-2026-61438-001

Limitations

Reads praisonai from 4.6.78 on in requirements*.txt at any depth and, at the project root only, in pyproject.toml, Pipfile, .mcp.json, mcp.json, claude_desktop_config.json and the Pipfile.lock, poetry.lock and uv.lock lockfiles, judging a range by the versions it admits. The dependency is not read when it is declared in a sub-directory manifest (services/api/pyproject.toml) or in a lockfile format the reader does not parse (pdm.lock). latest is 4.7.24, affected, so a reference that states no version is reported, beside the 4.6.78 rule's finding for its own records, and so is a range that admits releases on both sides of 4.6.78. It reads the version, not whether the project sets PRAISONAI_ALLOW_JOB_WORKFLOWS or keeps job workflows, so a project that never runs one is reported too. From 4.6.103 the executor is installed with praisonai-code, which praisonai requires with only a lower bound, and the rule reads praisonai's version, not praisonai-code's: a praisonai-code release that fixes the executor would not clear a praisonai reference. A project that names only praisonai-code is not reported, since neither the advisory nor the CVE record names that package, though every release of it to 0.1.21 carries the same function. npm's praisonai is the TypeScript framework, another project, and is not matched. A file over 2 MB, or a lockfile over 32 MiB, is not read. A declaration nested more than 64 levels deep in package.json, a TOML manifest or an MCP config (an MCP server more than 62) is still judged, and reported without a line; a lockfile entry keeps its line at any depth.

References


All rules. This page is generated from the rule registry when the documentation is built; to change it, change the rule in agent_audit_kit/rules/builtin.py. To give the rule a hand-written write-up, add docs/rules/AAK-PRAISONAI-CVE-2026-61438-001.md: the page then shows that text, with the registry reference appended under it.