PraisonAI Flaw: Arbitrary Code Execution via Unsanitized Tool Imports

PraisonAI Flaw: Arbitrary Code Execution via Unsanitized Tool Imports

The National Vulnerability Database (NVD) has detailed a critical arbitrary code execution vulnerability, CVE-2026-40287, affecting PraisonAI’s multi-agent teams system. Versions 4.5.138 and below are at risk due to the system’s automatic and unsanitized import of a tools.py file from the current working directory. This isn’t just a minor oversight; it’s a gaping hole.

Key components like call.py (import_tools_from_file()), tool_resolver.py (_load_local_tools()), and various CLI tool-loading paths blindly import ./tools.py at startup. There’s no validation, no sandboxing, and absolutely no user confirmation. This means if an attacker can drop a malicious tools.py file into the directory where PraisonAI is initiated – perhaps through a shared project, a cloned repository, or even a writable workspace – they gain immediate arbitrary Python code execution. We’re talking full compromise: the PraisonAI process, the host system, and any connected data or credentials are all fair game. This issue has since been patched in version 4.5.139, but the implications for unpatched systems are severe, as reflected by its CVSS score of 8.4 (HIGH).

Related ATT&CK Techniques

🛡️ Detection Rules

1 rules · 5 SIEM formats

1 auto-generated detection rules for this incident, mapped to MITRE ATT&CK. Available in Sigma, Splunk SPL, Sentinel KQL, Elastic Lucene, and QRadar AQL.

high T1574.002 Privilege Escalation

DLL Side-Loading Detection

Sigma Splunk SPL Sentinel KQL Elastic QRadar AQL

Get this rule in your SIEM's native format — copy, paste, detect. No manual conversion.

1 Sigma rules mapped to the ATT&CK techniques from this breach — pick your SIEM and get a ready-to-paste query.

Get Detection Rules →

Indicators of Compromise

IDTypeIndicator
CVE-2026-40287 RCE PraisonAI versions 4.5.138 and below
CVE-2026-40287 Code Injection Vulnerable component: call.py (import_tools_from_file())
CVE-2026-40287 Code Injection Vulnerable component: tool_resolver.py (_load_local_tools())
CVE-2026-40287 Code Injection Vulnerable mechanism: Automatic, unsanitized import of ./tools.py at startup

Related Posts

Critical RCE Flaw Hits NuGet Gallery Backend

CVE-2026-39399 — NuGet Gallery is a package repository that powers nuget.org. A security vulnerability exists in the NuGetGallery backend job’s handling of .nuspec files within...

vulnerabilityCVEcriticalhigh-severityremote-code-executioncwe-20cwe-22
/CRITICAL /⚑ 4 IOCs

BoidCMS LFI to RCE: A Critical Template Flaw

CVE-2026-39387 — BoidCMS is an open-source, PHP-based flat-file CMS for building simple websites and blogs, using JSON as its database. Versions prior to 2.1.3 are...

vulnerabilityCVEhigh-severityremote-code-executioncwe-98
/HIGH /⚑ 4 IOCs

Nanobot AI: WebSocket Hijack Puts WhatsApp Sessions at Risk

CVE-2026-35589 — nanobot is a personal AI assistant. Versions prior to 0.1.5 contain a Cross-Site WebSocket Hijacking (CSWSH) vulnerability exists in the bridge's WebSocket server...

vulnerabilityCVEhigh-severitycwe-1385
/HIGH /⚑ 5 IOCs