A Critical Vulnerability in PraisonAI: What You Need to Know
PraisonAI's CodeAgent component fails to validate LLM-generated Python code and does not enforce a sandbox, allowing an attacker to inject malicious code via the prompt. This lets the attacker execute arbitrary code on the host and exfiltrate environment secrets.
medium.com
Published on medium.com
As a working engineer, you’ve probably encountered your fair share of security vulnerabilities. But when it comes to remote code execution (RCE) vulnerabilities like CVE-2026–61447, the stakes are high.
The full write-up lives on its author's site
It belongs to its author, so we link to it rather than copy it. The other two tabs are our own rewrites, checked against it.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
How it worked
Root cause
Likely the CodeAgent component does not validate or restrict the Python code produced by the LLM and runs it without a sandbox.
Impact
An attacker could execute arbitrary code on the host system and exfiltrate sensitive environment secrets, with no privileges or network access required.
What the attacker needed
Ability to influence the LLM prompt
The fix
The vulnerability was fixed by updating PraisonAI to version 1.6.78 or higher.
How it was found
- Inject malicious Python code into the prompt to influence the LLM output.
- Use the malicious code to extract sensitive environment variables or other data.
- Use the malicious Python code to execute arbitrary commands on the host system.
Explained by bugbounty.wiki with AI from the original and checked against quotes from it; it can still be wrong. Read the original before relying on a detail.
Not written yet. The AI write-up for this write-up has not been written yet. The Original tab links to the source.
PraisonAI is a tool that uses a large language model (an AI that writes text) to generate Python code. The problem is that the tool runs whatever code the AI produces without checking it first. So if someone can make the AI write harmful code, that code runs on the computer and can steal secrets or do other damage.
What is RCE?
Running the attacker's code on the target's servers: through command or code injection, unsafe deserialisation or template injection.