CVE-2026-34938: PraisonAI Python Sandbox Escape via str Subclass startswith() Override

praisonaiagents Updated 02 Apr 2026

Summary

01/04/2026
Yes i
Critical
10.0

CVE-2026-34938: PraisonAI: Python Sandbox Escape via str Subclass startswith() Override in execute_code. Affects praisonaiagents versions < 1.5.90. Fixed in 1.5.90. 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 Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

PraisonAI is an advanced AI framework that allows users to create and manage AI agents. It provides a sandboxed environment for executing Python code safely. However, a critical vulnerability exists in the way it handles string subclasses, which can lead to unauthorized command execution on the host system.

Vulnerability Detail

The vulnerability arises from the execute_code() function in the praisonai-agents package, which runs user-controlled Python code within a three-layer sandbox. An attacker can bypass this sandbox by passing a custom str subclass with an overridden startswith() method to the _safe_getattr function. This allows the attacker to execute arbitrary OS commands, posing a severe risk to the host system. The vulnerability is particularly dangerous because it can be triggered without human confirmation in certain deployment configurations.

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.5.90

This is the first release that contains the fix.

pip install --upgrade "praisonaiagents==1.5.90"

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 execute_code() function with untrusted input. Ensure that any code executed within the PraisonAI environment is thoroughly vetted and does not include any custom string subclasses that could exploit this vulnerability.

Conclusion

CVE-2026-34938 is a critical vulnerability in the PraisonAI framework that allows for arbitrary OS command execution due to improper handling of string subclasses. It is essential to update to the latest version of the package to mitigate this risk and ensure the security of your applications.

See every vulnerability recorded for praisonaiagents →

Share this vulnerability

FAQ

CVE-2026-34938 is a critical vulnerability in the PraisonAI framework that allows attackers to escape a sandboxed environment and execute arbitrary OS commands.

You can use the Vulert playground at Vulert Scanner to check if your application is affected by this vulnerability without needing to sign up.

The CVSS score of this vulnerability is 10.0, indicating a critical severity level.

If you cannot update the package immediately, avoid using the execute_code() function with untrusted input as a temporary workaround.

You can find more information about PraisonAI and its features on its official documentation or GitHub repository.

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.5.90

This is the first release that contains the fix.

pip install --upgrade "praisonaiagents==1.5.90"

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