Skip to main content
CVE Vulnerability Database
Vulnerability Database/CVE-2026-61433

CVE-2026-61433: PraisonAI RCE Vulnerability Explained

CVE-2026-61433 is a remote code execution vulnerability in PraisonAI allowing attackers to inject malicious Python code through configuration parameters. This article covers the technical details, affected versions, and mitigations.

Published:

CVE-2026-61433 Overview

CVE-2026-61433 is a code injection vulnerability [CWE-94] in PraisonAI versions before 4.6.78. The framework fails to safely encode deployment configuration values when generating Python source code for API servers. Attackers can inject arbitrary Python expressions through the deploy.api.host and agents_file configuration parameters. The injected expressions execute when the generated server starts or processes requests.

Critical Impact

An attacker who controls PraisonAI deployment configuration can achieve arbitrary Python code execution on the host running the generated API server, leading to full compromise of confidentiality, integrity, and availability.

Affected Products

  • PraisonAI versions prior to 4.6.78
  • PraisonAI API deployment generator component
  • Python-based agent servers produced by the deployment tooling

Discovery Timeline

  • 2026-07-15 - CVE-2026-61433 published to the National Vulnerability Database (NVD)
  • 2026-07-15 - Last updated in NVD database

Technical Details for CVE-2026-61433

Vulnerability Analysis

PraisonAI generates Python source files that expose agent workflows through an HTTP API. The generator interpolates user-supplied configuration values directly into the produced Python source without escaping or validation. Because the values become Python code rather than string literals evaluated at runtime, any Python expression placed in deploy.api.host or agents_file becomes part of the executable module.

When the generated server is launched or handles an incoming request, the interpreter evaluates the injected expression with the privileges of the server process. The flaw maps to CWE-94 (Improper Control of Generation of Code) and yields high impact to confidentiality, integrity, and availability on the local host.

Root Cause

The root cause is unsafe string interpolation in the API deployment generator. Configuration values sourced from YAML or command-line input are concatenated into a Python template instead of being emitted as quoted, escaped string literals. The generator performs no allow-list validation on hostnames or file paths before embedding them.

Attack Vector

Exploitation requires an attacker to influence the PraisonAI deployment configuration and requires user interaction to trigger generation and launch of the server. Any actor able to submit or modify a deployment configuration — for example through a shared configuration file, CI pipeline input, or a UI that forwards values to the generator — can supply a payload containing a Python expression that closes the surrounding literal and appends attacker-controlled code.

python
# Legacy handler file removed as part of the surrounding cleanup in the fix commit
# Source: https://github.com/MervinPraison/PraisonAI/commit/1620b49f36945d8cc8ee5635b906c960df5097a0

"""Shared legacy @aiui.reply handlers for bundled default apps."""

from __future__ import annotations


def register_legacy_reply(aiui, *, agent_name: str = "PraisonAI"):
    """Register callback-only reply handler when ``PRAISONAI_HOST_LEGACY=1``."""

    @aiui.reply
    async def legacy_reply(message: str, session_id: str = "default"):
        from praisonaiagents import Agent

        agent = Agent(
            name=agent_name,
            instructions="You are a helpful assistant.",
            llm="gpt-4o-mini",
        )
        return agent.run(message)

The snippet above shows an orphaned legacy handler file removed in the fix commit 1620b49f36945d8cc8ee5635b906c960df5097a0. Refer to the GitHub Security Advisory GHSA-79fv-7hq9-w7xg and the VulnCheck Advisory on PraisonAI for the specific injection sinks and payload structure.

Detection Methods for CVE-2026-61433

Indicators of Compromise

  • Presence of PraisonAI installations with a package version earlier than 4.6.78.
  • Generated API server files containing quote characters, newlines, or Python operators embedded inside the host or agents_file variables.
  • Unexpected child processes spawned by the PraisonAI API server, such as shells or network utilities.
  • Outbound network connections from the API server process to unfamiliar destinations shortly after startup.

Detection Strategies

  • Inspect deployment configuration files for values in deploy.api.host and agents_file that contain characters outside the expected hostname or file path grammar.
  • Diff generated Python server modules against a known-good template to reveal injected statements or imports.
  • Alert on the PraisonAI process invoking interpreters, package managers, or network tools that are absent from a baseline execution profile.

Monitoring Recommendations

  • Log every invocation of the PraisonAI deployment generator along with the configuration inputs used.
  • Monitor filesystem writes to directories that hold generated server source, and review changes before execution.
  • Forward host process and network telemetry to a central analytics platform so anomalous behavior from Python agent servers can be correlated with configuration changes.

How to Mitigate CVE-2026-61433

Immediate Actions Required

  • Upgrade PraisonAI to version 4.6.78 or later on all systems that run the API deployment generator.
  • Audit existing generated server files for injected Python code and regenerate them from trusted configuration once patched.
  • Restrict write access to PraisonAI configuration sources such as YAML files and CI variables to trusted operators only.
  • Rotate credentials and tokens exposed to any host that ran a generated server built from untrusted configuration.

Patch Information

The fix is included in PraisonAI 4.6.78. Related repository changes are visible in the GitHub commit 1620b49, and the coordinated disclosure is documented in the GitHub Security Advisory GHSA-79fv-7hq9-w7xg.

Workarounds

  • Do not run the PraisonAI API deployment generator against configuration originating from untrusted users or repositories.
  • Validate deploy.api.host against a strict hostname allow-list and agents_file against a fixed set of expected file paths before invoking the generator.
  • Execute generated API servers under a dedicated low-privilege service account with no access to secrets or production data until the upgrade is applied.
bash
# Upgrade PraisonAI to the fixed release
pip install --upgrade 'praisonai>=4.6.78'

# Verify the installed version
python -c "import praisonai; print(praisonai.__version__)"

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.