CVE-2026-47398

PraisonAI: Arbitrary code execution via unguarded `spec.loader.exec_module` in `agents_generator.py` - sibling of CVE-2026-44334

Published Jul 21, 2026 CVSS 3.1 · 8.1 High EPSS < 1% KEV · Not listed
Description
PraisonAI is a multi-agent teams system. The v4.6.32 chokepoint refactor (which patched CVE-2026-44334 / GHSA-xcmw-grxf-wjhj) added the PRAISONAI_ALLOW_LOCAL_TOOLS env-var gate to the tool_override.py sinks. However, two additional spec.loader.exec_module call sites in praisonai/agents_generator.py were missed and remain completely unguarded in versions prior to 4.6.40. Both functions accept a module_path parameter sourced from YAML configuration and execute it without validation, signature checking, or the env-var gate. Version 4.6.40 fixes the issue.

Analysis

AI-generated

Technical impact

After the v4.6.32 refactor that added the PRAISONAI_ALLOW_LOCAL_TOOLS environment variable gate to tool_override.py, PraisonAI still had two unguarded spec.loader.exec_module calls in agents_generator.py. These calls accept a module_path parameter sourced from YAML configuration and execute it without validation, signature checking, or the env‑var gate. The lack of validation allows an attacker to run arbitrary Python code, compromising confidentiality, integrity, and availability of the system. The weakness is a direct code execution flaw, corresponding to CWE-829 and CWE-94.

Affected Systems

The vulnerability affects MervinPraison PraisonAI versions before 4.6.40. The 4.6.32 chokepoint refactor added a gate for tool overrides, but did not cover the two exec_module sites in agents_generator.py. Users running any release older than 4.6.40 are at risk.

Risk and Exploitability

The CVSS score of 8.1 indicates high severity. The EPSS score of less than 1% suggests a low probability of exploitation at the time of this analysis, and the vulnerability is not listed in CISA’s KEV catalog. The attack likely requires the ability to influence the YAML configuration that specifies the module_path, so the vector is inferred to be local or mediated. Even so, the impact is complete arbitrary code execution once the flaw is triggered.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Upgrade PraisonAI to version 4.6.40 or later to remove the unguarded exec_module calls.
  • If an upgrade cannot be performed immediately, restrict the YAML configuration to trusted sources and validate the contents before processing them.
  • Review the agent generation code for any remaining exec_module usage and apply a security gate or signature check as a temporary mitigation until a full patch is available.

Generated by OpenCVE AI on July 30, 2026 at 17:10 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-78r8-wwqv-r299 PraisonAI: Arbitrary code execution via unguarded `spec.loader.exec_module` in `agents_generator.py` - sibling of CVE-2026-44334
History
Type Values Removed Values Added
First Time appeared Mervinpraison
Mervinpraison praisonai
Vendors & Products Mervinpraison
Mervinpraison praisonai
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
Description PraisonAI is a multi-agent teams system. The v4.6.32 chokepoint refactor (which patched CVE-2026-44334 / GHSA-xcmw-grxf-wjhj) added the PRAISONAI_ALLOW_LOCAL_TOOLS env-var gate to the tool_override.py sinks. However, two additional spec.loader.exec_module call sites in praisonai/agents_generator.py were missed and remain completely unguarded in versions prior to 4.6.40. Both functions accept a module_path parameter sourced from YAML configuration and execute it without validation, signature checking, or the env-var gate. Version 4.6.40 fixes the issue.
Title PraisonAI: Arbitrary code execution via unguarded `spec.loader.exec_module` in `agents_generator.py` - sibling of CVE-2026-44334
Weaknesses CWE-829
CWE-94
References
Metrics cvssV3_1

{'score': 8.1, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H'}

Weaknesses
  • CWE-829

    Inclusion of Functionality from Untrusted Control Sphere

  • CWE-94

    Improper Control of Generation of Code ('Code Injection')

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Jul 21, 2026, 4:33 PM
Reserved
May 19, 2026, 7:22 PM
Status
Deferred
Published
Jul 21, 2026, 5:17 PM
Modified
Oct 24, 2026, 7:10 PM