Junglewise Threat Intelligence

CVE-2026-61437: PraisonAI unsafe dynamic module loading in AgentFlow

CVE-2026-61437 · Severity: high · CVSS 7.8 · Published 2026-07-10

Technologies: MervinPraison (PraisonAI) Praisonaiagents.

Executive brief

PraisonAI is an AI agent framework used to automate complex tasks through workflows. A security flaw allows the framework to automatically execute Python code from a file named 'tools.py' if it is located in the same folder as a workflow file being processed. If an attacker can convince a user to run a malicious workflow or place a malicious file in a monitored directory, they can gain full control over the user's system, potentially leading to data theft or unauthorized access to sensitive information.

Technical details

A vulnerability exists in the `AgentFlow._resolve_pydantic_class` method within `src/praisonai-agents/praisonaiagents/workflows/workflows.py`. When a workflow step utilizes a string-based `output_pydantic` reference, the framework automatically attempts to locate and import a sibling `tools.py` file from the workflow's directory using `importlib.util.exec_module`. This process occurs without sandboxing and bypasses existing security configurations like `PRAISONAI_ALLOW_*_TOOLS`. An attacker who can provide a malicious workflow file and a corresponding `tools.py` (e.g., via shared repositories or CI/CD artifacts) can achieve arbitrary Python code execution with the privileges of the workflow runner. The issue is addressed in version 1.6.78.

Affected products

  • MervinPraison (PraisonAI) praisonaiagents < 1.6.78

Timeline

  • 2026-06-25: advisory: GitHub Security Advisory GHSA-4gfv-wg42-7jw5 published
  • 2026-07-10: disclosed: CVE-2026-61437 published to NVD
  • 2026-07-10: patched: Fix confirmed in version 1.6.78

References