CVE-2026-61447: PraisonAI CodeAgent Executes LLM-Generated Code Without Sandboxing, Exposing Environment Secrets

praisonaiagents Updated 15 Oct 2026

Summary

15/10/2026
Yes i
Critical
10.0

CVE-2026-61447: PraisonAI: CodeAgent Executes LLM-Generated Code Without Sandboxing and Leaks All Environment Secrets. Affects praisonaiagents versions < 1.6.78. Fixed in 1.6.78. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Your last release was probably never penetration tested Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

PraisonAI is a framework that leverages large language models (LLMs) to automate tasks through code execution. The 'praisonaiagents' package allows users to create agents that can execute Python code generated by LLMs. However, it has a critical vulnerability that permits the execution of arbitrary code without proper sandboxing, leading to potential exposure of sensitive environment variables.

Vulnerability Detail

The vulnerability arises from the method CodeAgent._execute_python(), which executes LLM-generated Python code in a subprocess using the complete parent-process environment. This method lacks any form of AST validation, import restrictions, or sandbox enforcement, even when the sandbox option is enabled. As a result, an attacker can manipulate the LLM output through prompt injection, allowing them to exfiltrate sensitive information such as API keys and execute arbitrary code on the host system. Key technical aspects include the use of os.environ.copy() to pass all environment variables to the subprocess and the absence of any validation or restrictions on the executed code.

How To Fix

Latest published version: 1.7.14 as of 22 Oct 2026

pip install --upgrade "praisonaiagents==1.7.14"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.6.78

This is the first release that contains the fix.

pip install --upgrade "praisonaiagents==1.6.78"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

As a temporary workaround, avoid using the CodeAgent._execute_python() method until the package is updated. Instead, consider using alternative methods for executing code that include proper sandboxing and validation. For example, you can use the following code snippet to execute code in a more secure manner:

import subprocess
import tempfile

def secure_execute(code: str):
    with tempfile.NamedTemporaryFile(mode='w', suffix='.py', delete=False) as f:
        f.write(code)
        temp_file = f.name
    result = subprocess.run(["python", temp_file], capture_output=True, text=True)
    return result.stdout

Conclusion

The PraisonAI vulnerability CVE-2026-61447 poses significant risks due to its lack of sandboxing and validation when executing LLM-generated code. Users are strongly advised to update to the patched version of the package and implement secure coding practices to mitigate potential threats.

See every vulnerability recorded for praisonaiagents →

Share this vulnerability

FAQ

CVE-2026-61447 is a vulnerability in the PraisonAI 'praisonaiagents' package that allows execution of unvalidated LLM-generated code, exposing sensitive environment variables.

An attacker can exploit this vulnerability by manipulating the input to the LLM, leading to the execution of arbitrary code and exfiltration of sensitive information.

The impacts include full credential theft, arbitrary code execution, and remote exploitation, as all environment variables are accessible to the executed code.

You can check if your application is affected by using Vulert, which monitors and alerts for open-source vulnerabilities in real-time. Visit Vulert Scanner to use the Vulert playground without signup.

If you cannot update the package, avoid using the vulnerable method and implement a temporary workaround that includes proper sandboxing and validation for executing code.

Related vulnerabilities

Recent vulnerabilities recorded for praisonaiagents.

How To Fix

Latest published version: 1.7.14 as of 22 Oct 2026

pip install --upgrade "praisonaiagents==1.7.14"

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

1.6.78

This is the first release that contains the fix.

pip install --upgrade "praisonaiagents==1.6.78"

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback