Skip to main content

Praisonai CVE-2026-40156

| EUVDEUVD-2026-21508 HIGH
Code Injection (CWE-94)
2026-04-10 GitHub_M GHSA-2g3w-cpc4-chr4
7.8
CVSS 3.1 · GitHub Advisory
Share

Severity by source

GitHub Advisory PRIMARY
7.8 HIGH
AV:L/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H

Primary rating from GitHub Advisory · only source for this CVE.

CVSS VectorGitHub Advisory

Attack Vector
Local
Attack Complexity
Low
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

5
Re-analysis Queued
Apr 20, 2026 - 20:07 vuln.today
cvss_changed
Patch released
Apr 10, 2026 - 20:30 nvd
Patch available
EUVD ID Assigned
Apr 10, 2026 - 17:15 euvd
EUVD-2026-21508
Analysis Generated
Apr 10, 2026 - 17:15 vuln.today
CVE Published
Apr 10, 2026 - 16:46 nvd
HIGH 7.8

DescriptionGitHub Advisory

PraisonAI is a multi-agent teams system. Prior to 4.5.128, PraisonAI automatically loads a file named tools.py from the current working directory to discover and register custom agent tools. This loading process uses importlib.util.spec_from_file_location and immediately executes module-level code via spec.loader.exec_module() without explicit user consent, validation, or sandboxing. The tools.py file is loaded implicitly, even when it is not referenced in configuration files or explicitly requested by the user. As a result, merely placing a file named tools.py in the working directory is sufficient to trigger code execution. This behavior violates the expected security boundary between user-controlled project files (e.g., YAML configurations) and executable code, as untrusted content in the working directory is treated as trusted and executed automatically. If an attacker can place a malicious tools.py file into a directory where a user or automated system (e.g., CI/CD pipeline) runs praisonai, arbitrary code execution occurs immediately upon startup, before any agent logic begins. This vulnerability is fixed in 4.5.128.

AnalysisAI

Arbitrary code execution occurs in PraisonAI (all versions prior to 4.5.128) when a malicious tools.py file exists in the working directory. The framework automatically imports and executes this file during startup without validation or user consent, enabling unauthenticated local attackers to execute arbitrary Python code by placing a weaponized tools.py in directories accessed by users or CI/CD pipelines. User interaction is required (running praisonai command). No public exploit identified at time of analysis.

Technical ContextAI

Vulnerability stems from unsafe use of importlib.util.spec_from_file_location() combined with spec.loader.exec_module() to load tools.py from current working directory. Module-level code executes immediately during import without sandboxing, validation, or explicit user authorization. CWE-94 code injection via implicit trust of working directory contents violates principle of least privilege for filesystem resources.

RemediationAI

Vendor-released patch: upgrade to PraisonAI version 4.5.128 or later, which addresses the unsafe automatic loading of tools.py files. Organizations should audit CI/CD pipelines and shared development environments for untrusted tools.py files introduced through supply chain or repository compromise. As immediate mitigation prior to patching, restrict write access to working directories where praisonai executes, implement filesystem monitoring for unexpected tools.py creation, and review existing tools.py files for malicious code. Full technical details and vendor advisory: https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-2g3w-cpc4-chr4

CVE-2026-55536 CRITICAL POC
9.1 Aug 25

WebSocket origin-validation bypass in PraisonAI's Browser Server (praisonai/browser/server.py) before 4.6.58 lets an att

CVE-2026-55541 HIGH POC
8.8 Aug 25

PraisonAI's `praisonai serve` subsystem (agents and unified modes) accepts an `--api-key` CLI flag that is parsed but ne

CVE-2026-55534 HIGH POC
8.6 Aug 25

Unauthenticated remote agent invocation in PraisonAI versions 4.6.34 through 4.6.57 allows any network-reachable caller

CVE-2026-55526 HIGH POC
8.5 Aug 25

SSRF protection bypass in PraisonAI's praisonaiagents library (all versions before 1.6.58) lets low-privileged users rou

CVE-2026-55533 HIGH POC
8.2 Aug 25

Authentication fail-open in PraisonAI's Recipe HTTP server allows unauthenticated remote attackers to invoke recipe exec

CVE-2026-55528 HIGH POC
8.2 Aug 25

Authentication bypass in PraisonAI's AgentServer component exposes all routes - /publish, /events, /info, /health - to u

CVE-2026-55522 HIGH POC
7.8 Aug 05

Arbitrary Python code execution in PraisonAI's workflow include feature allows an attacker who controls a local recipe d

CVE-2026-55523 HIGH POC
7.7 Aug 05

Server-side request forgery in PraisonAI's web_crawl() function (versions 1.5.128-1.6.57) allows an attacker who can inf

CVE-2026-55532 HIGH POC
7.6 Aug 25

Cross-site request forgery against the PraisonAI MCP HTTP-stream transport allows unauthenticated remote attackers to ex

CVE-2026-44338 HIGH POC
7.3 May 08

Remote unauthenticated access to PraisonAI's legacy Flask API server allows attackers to execute configured agent workfl

CVE-2026-55527 HIGH POC
7.1 Aug 25

Path traversal in praisonaiagents prior to 1.6.58 allows a low-privileged caller to write arbitrary JSON files to any pr

CVE-2026-55535 MEDIUM POC
6.8 Aug 25

Server-Side Request Forgery in PraisonAI before version 4.6.58 allows unauthenticated remote attackers to force the appl

Share

CVE-2026-40156 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy