Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessControl agents_file value via CLI/config/pipeline
-
ExploitInject Python via f-string string-breakout
-
ExecutionCode written to server/Dockerfile and executed via subprocess.Popen
-
ImpactArbitrary code execution on deploy host
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Code injection prevention, sandbox exec
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Initial Access The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the attacker to control the |
| Impact | This is a CWE-94 Python code-injection flaw in PraisonAI's deploy tooling where the unsanitized |
| Exploit ScenarioDerived | In a CI/CD pipeline that runs |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 07, 2026
Python code injection in PraisonAI's deploy tooling (all versions up to and including 4.6.77) lets a high-privileged actor who controls the agents_file value break out of an f-string and execute arbitrary code on the host running the deploy command. The flaw is triggered at build/deploy time: the unsanitized value is interpolated into generated server or Dockerfile source in deploy/api.py and deploy/docker.py, written to disk, and then launched via subprocess.Popen(['python', server_file]), so the primary realistic exposure is CI/CD pipelines or shared build environments where agents_file originates from externally influenced configuration. The vendor advisory includes a proof-of-concept demonstrating the string-breakout payload and a fix is available in 4.6.78; no CISA KEV entry or other confirmation of active exploitation was present in the source data, and this is not a remotely reachable flaw in a default running service - exploitation requires the attacker to already be positioned to set or tamper with deploy-time input and for someone to invoke the deploy command.
RemediationAI
The primary fix is to upgrade PraisonAI to the vendor-released patched version, 4.6.78 or later, which removes the direct f-string interpolation of agents_file in both deploy/api.py and deploy/docker.py; installs should be pinned by exact version in requirements files, lockfiles, and container base images so that CI rebuilds pick up the fixed release rather than resolving back to a vulnerable pin. Because the vulnerable path is only reachable at deploy/generation time, compensating controls are viable where immediate upgrading is not possible: treat agents_file as untrusted input and never populate it from externally influenced configuration, pipeline variables, or upstream API payloads - instead hard-code or allow-list the accepted agent file paths, which stops the breakout entirely at the cost of less flexible deploys; restrict who may set the agents_file argument or commit the invoking configuration (per the assessed PR:H privilege requirement, only trusted maintainers should hold that ability), accepting the operational overhead of stricter contributor controls; run praisonai deploy in a least-privilege, network-restricted build container with no access to production credentials, which limits blast radius and supply-chain reach but does not prevent the code from executing; and inspect the generated server file or Dockerfile produced by the deploy command before it is executed, which is a manual review step that is only practical for low-volume or release-gated pipelines. Two of these - the advisory PoC and the assessed local, high-privilege attack vector - confirm the flaw is reachable by anyone who can influence deploy input, so removing untrusted write access to that parameter should be treated as the highest-value interim measure. Note that this assessment reflects no CISA KEV listing; the independent evaluation classifies this as a local, high-privilege build/deploy-time code injection rather than a remotely exploitable web-service flaw, so remediation efforts should be prioritized around CI/CD trust boundaries as much as around the version bump itself.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in pypi
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
The root cause is CWE-94 (Improper Control of Generation of Code, i.e. code injection) in PraisonAI's deployment code generator, distributed as the Python package pip/praisonai (CPE: pkg:pip/praisonai). Rather than passing the agents_file path as structured data, src/praisonai/praisonai/deploy/api.py builds a Python source template using an f-string - praisonai = PraisonAI(agent_file="{agents_file}") - with no escaping or validation, and the identical anti-pattern is repeated in deploy/docker.py around line 33 for Dockerfile generation. Because the interpolated value lands inside a quoted Python string literal in the generated file, a value such as "); import os; os.system("id"); # terminates the string and comment character and appends attacker-controlled statements; when the generator subsequently writes that file and hands it to subprocess.Popen(['python', server_file]), the injected statements execute with the privileges of the deploying user. This is classic template/source-generation injection: the interpolation site conflates a data value with code, and the execution sink makes any control over that value equivalent to code execution. Note that the injected code only runs when the deploy workflow is actually invoked, and it executes on the local host under the account running that workflow rather than against a network-facing server component.
Know when Python gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
Attacker must control deploy-time agents_file input (config/CLI), so AV:L and PR:H; injected code runs in the same context yielding full C/I/A impact with no scope change (S:U).
Primary rating from Vendor (https://github.com/MervinPraison/PraisonAI).
CVSS VectorVendor: https://github.com/MervinPraison/PraisonAI
Lifecycle Timeline
2DescriptionCVE.org
Summary
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.
Details
src/praisonai/praisonai/deploy/api.py (line 80):
code = f'''...
praisonai = PraisonAI(agent_file="{agents_file}")
...
"agent_file": "{agents_file}"
...'''The generated code is then executed (line 190):
subprocess.Popen(['python', server_file])agents_file is never sanitized or validated. A malicious value breaks out of the string context:
agents_file = '"); import os; os.system("id"); #'
# Generated code becomes:
# praisonai = PraisonAI(agent_file=""); import os; os.system("id"); #")The same pattern exists in deploy/docker.py (line 33) for Dockerfile generation.
PoC
# The injection:
agents_file = '"); import os; os.system("id"); #'
# What the generated code looks like:
template = f'praisonai = PraisonAI(agent_file="{agents_file}")'
print(template)
# Output: praisonai = PraisonAI(agent_file=""); import os; os.system("id"); #")Impact
- Arbitrary code execution on the machine running the deploy command
- Supply chain risk if
agents_filecomes from a configuration file or CI/CD pipeline
Articles & Coverage 2
Technical POC Analysis
CWE-94 Improper Control of Generation of Code.
Full technical POC analysis - root cause, step-by-step exploitation and patch breakdown - is part of the Pro and Business plans.
Executive ViewAI
PraisonAI's deploy tooling (all versions through 4.6.77) contains a critical code-injection flaw that lets a privileged actor who controls the agents_file configuration value execute arbitrary code on the host running a deployment build. The practical exposure is concentrated in CI/CD pipelines and shared build environments where that setting can be influenced from outside the build team, creating a path to compromised build infrastructure and tampered release artifacts. Leadership should treat this as a software supply-chain risk affecting engineering operations, not as an internet-facing service vulnerability, since it is not remotely reachable in a default running deployment and no active exploitation has been confirmed.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
Code injection occurs when an application accepts user input and passes it directly into a language interpreter or evaluator without proper sanitization.
Remote Code Execution represents the critical moment when an attacker successfully runs arbitrary code on a target system without physical access.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
EUVD-2026-94521
GHSA-g6j7-pffp-8whg
NVD
CVE.org
EPSS
Vulnrichment
Exploit-DB