CVE-2026-62176

PraisonAI: Code Injection via f-string Interpolation in Deploy API Server Generation

Published Oct 7, 2026 CVSS 3.1 · 9.1 Critical EPSS < 1% KEV · Not listed
Description
PraisonAI is a multi-agent teams system. Prior to version 4.6.78, the `deploy/api.py` module generates Python server code by directly interpolating the `agents_file` parameter into an f-string that is then written to a file and executed via `subprocess.Popen()`. An attacker who controls the `agents_file` value (via CLI argument, configuration, or upstream API) can inject arbitrary Python code. Version 4.6.78 patches the issue.

Analysis

AI-generated

Technical impact

PraisonAI’s Deploy API Server Generation module builds Python code from an f‑string that directly includes the agents_file parameter. This code is written to disk and executed by subprocess.Popen(), allowing an attacker who can control the agents_file value to inject arbitrary Python statements. The injection is a classic code injection flaw (CWE‑94), giving the attacker full compromise of the execution environment, potentially leading to data exfiltration, persistence, or additional malware deployment.

Affected Systems

MervinPraison PraisonAI, all releases earlier than version 4.6.78. Users of the deploy API or processes that can set the agents_file argument without proper validation are at risk.

Risk and Exploitability

The CVSS score of 9.1 indicates a high severity, and though an EPSS score is not available, the lack of mitigation in the affected versions makes exploitation highly likely for any system that processes user input for agents_file. The flaw is not listed in CISA’s KEV catalog, but the functional nature of the code injection provides a straightforward attack path: a remote client or local attacker can supply a crafted agents_file value to the API, resulting in the server executing arbitrary code. This inference assumes the API or configuration setting is reachable by an attacker, which is typical for services exposed to external inputs.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the PraisonAI 4.6.78 patch or newer.
  • Ensure that the deploy/api module validates or sanitizes the agents_file parameter before interpolation, rejecting non‑existent or unsafe file paths.
  • Limit consumption of the deploy API to trusted users or networks, enforcing strict access controls.

Generated by OpenCVE AI on October 7, 2026 at 18:20 UTC.

Tracking

Sign in to view the affected projects.

Advisories

Source ID Title
Github GHSA Github GHSA GHSA-g6j7-pffp-8whg PraisonAI: Code Injection via f-string Interpolation in Deploy API Server Generation
History
Type Values Removed Values Added
First Time appeared Mervinpraison
Mervinpraison praisonai
Vendors & Products Mervinpraison
Mervinpraison praisonai
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. Prior to version 4.6.78, the `deploy/api.py` module generates Python server code by directly interpolating the `agents_file` parameter into an f-string that is then written to a file and executed via `subprocess.Popen()`. An attacker who controls the `agents_file` value (via CLI argument, configuration, or upstream API) can inject arbitrary Python code. Version 4.6.78 patches the issue.
Title PraisonAI: Code Injection via f-string Interpolation in Deploy API Server Generation
Weaknesses CWE-94
References
Metrics cvssV3_1

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

Weaknesses
  • CWE-94

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

Sources

Status
PUBLISHED
Assigner
GitHub_M
Published
Updated
Oct 7, 2026, 4:57 PM
Reserved
Jul 13, 2026, 2:16 PM
Status
Deferred
Published
Oct 7, 2026, 5:16 PM
Modified
Oct 7, 2026, 5:16 PM