Junglewise Threat Intelligence

CVE-2026-55522: PraisonAI workflow include remote code execution in tools.py

CVE-2026-55522 · Severity: high · CVSS 7.8 · Published 2026-08-25

Executive brief

PraisonAI is an AI framework that orchestrates workflows and recipes. The workflow feature allows including other recipes as sub-steps. The vulnerability allows attackers to execute arbitrary Python code by placing a malicious `tools.py` file in a recipe directory that gets included in a workflow, even when the system is configured to disable automatic tool loading. This could allow an attacker with access to the workflow configuration or recipe files to run commands as the PraisonAI process user.

Technical details

The vulnerability exists in `praisonaiagents/workflows/workflows.py` in the `Workflow._execute_include()` method. When a workflow includes a recipe using the `Include` feature or YAML `include` directive, the code directly executes `importlib.util.spec_from_file_location()` followed by `spec.loader.exec_module()` on the recipe's `tools.py` file without checking the `PRAISONAI_ALLOW_TEMPLATE_TOOLS` or `PRAISONAI_ALLOW_LOCAL_TOOLS` environment variables that control tool autoloading elsewhere in the codebase. This allows module-level Python code to execute unconditionally during workflow initialization, before any LLM calls or child workflow parsing. The attack requires the attacker to control or influence a local recipe directory that is included in the victim's workflow, making exploitation possible in multi-tenant environments, CI/CD pipelines, or scenarios where workflows accept dynamic recipe paths. Patch available in version 4.6.58 for praisonaiagents and version 4.6.58 for praisonai.

Affected products

  • PraisonAI praisonaiagents >=0.12.12, <1.6.58
  • PraisonAI praisonai >=3.9.26, <4.6.58

Timeline

  • 2026-06-13: disclosed: Published on GitHub Advisory Database
  • 2026-08-25: patched: Fixed in praisonaiagents 1.6.58 and praisonai 4.6.58

References