CVE-2026-62176: Code Injection in PraisonAI Deploy API via f-string Interpolation
What's happening
CVE-2026-62176 is a CWE-94 code injection vulnerability in PraisonAI's deploy API server. The deploy/api.py module builds Python server source code by interpolating the agents_file parameter directly into an f-string, then writes the resulting source to disk and executes it via subprocess.Popen. Because the value is never sanitized or escaped before interpolation, an attacker who controls agents_file — whether through a CLI argument, a configuration file, or an upstream API call — can break out of the string literal and inject arbitrary Python statements. Those statements get written into the generated server file and run with the privileges of the deploy process, yielding full code execution. The same unsafe interpolation pattern is present in deploy/docker.py, so container-based deploy flows are equally exposed.
Affected software
All PraisonAI releases 4.6.77 and earlier are affected. A fix is tracked for 4.6.78; no patch date has been confirmed yet. PraisonAI is distributed via pip, and the vulnerability scores CVSS 9.1, reflecting the ease of exploitation and the severity of unauthenticated code execution once an attacker can influence the agents_file value.
Exploitation status
A public proof-of-concept exists for this vulnerability. It is not currently listed in CISA's Known Exploited Vulnerabilities (KEV) catalog, so there is no confirmed evidence of in-the-wild exploitation — but public PoC code substantially lowers the bar for attackers and typically precedes broader exploitation attempts. Defenders should treat this as actively exploitable and prioritize patching or mitigating exposed PraisonAI deploy endpoints.
How our detection catches it
Our detection ships across Microsoft Sentinel (KQL), Splunk (SPL), Elastic (EQL), QRadar (AQL), Sumo Logic, Chronicle (YARA-L), and CrowdStrike (CQL), giving coverage regardless of which SIEM or EDR stack an organization runs. The logic targets three observable stages of the attack chain: invocation of PraisonAI's deploy command with attacker-influenced parameters, filesystem writes of the dynamically generated Python server source file where injected payload content would surface, and anomalous child processes spawned by the resulting Python server process — a strong signal that injected code executed successfully rather than the intended server logic. Correlating these three signals helps separate genuine exploitation from benign deploy activity and reduces false positives from normal PraisonAI usage.
Full detection details
For the complete detection logic, platform-specific queries, investigation guidance, and atomic tests, see the full writeup at df00tech.com/detections/CVE-2026-62176.