Arbitrary Code Injection Affecting praisonai package, versions [,4.5.140)


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.03% (8th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Arbitrary Code Injection vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-PYTHON-PRAISONAI-16322827
  • published30 Apr 2026
  • disclosed10 Apr 2026
  • creditLAKSHMIKANTHAN K

Introduced: 10 Apr 2026

CVE-2026-40156  (opens in a new tab)
CWE-94  (opens in a new tab)

How to fix?

Upgrade PraisonAI to version 4.5.140 or higher.

Overview

PraisonAI is a PraisonAI is an AI Agents Framework with Self Reflection. PraisonAI application combines PraisonAI Agents, AutoGen, and CrewAI into a low-code solution for building and managing multi-agent LLM systems, focusing on simplicity, customisation, and efficient human-agent collaboration.

Affected versions of this package are vulnerable to Arbitrary Code Injection through the automatic loading of the tools.py file from the current working directory using importlib.util.spec_from_file_location and immediate execution via spec.loader.exec_module(). An attacker can execute arbitrary code by placing a malicious tools.py file in the working directory where the application is started.

Note: This is only exploitable if an attacker is able to write a file named tools.py to the working directory prior to application startup.

CVSS Base Scores

version 4.0
version 3.1