CVE-2026-40287: Praisonaiagents Remote Code Execution Vulnerability
HIGHCVE-2026-40287 is a HIGH (CVSS 8.4) remote code execution vulnerability (CWE-426: Untrusted Search Path) affecting Praisonaiagents libraries in the PyPI ecosystem. The issue involves praisonai vulnerable to rce via automatic tools.py import. Remediation is available by upgrading affected packages to version 1.5.140, 4.5.139.
CVE-2026-40287 at a Glance
Security Impact
CVSS: 8.4
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H).
How to Fix CVE-2026-40287
To remediate this vulnerability, upgrade all affected Praisonaiagents dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
pip install praisonaiagents>=1.5.140
pip install PraisonAI>=4.5.139
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
pip show praisonaiagents
How to Check if You Are Affected
To determine whether your Python environment is affected by CVE-2026-40287, inspect your installed packages using pip:
pip show praisonaiagents
Analyze the terminal output to locate any version of Praisonaiagents in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.5.140), your application is affected.
Note: The pip show praisonaiagents command checks currently installed packages in your active Python environment.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-426: Untrusted Search Path, where the product searches for critical resources using an externally-supplied search path that can point to resources that are not under the product's direct control. In Praisonaiagents, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
CVE-2026-40287 Affected Praisonaiagents Versions
2 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
praisonaiagents
|
PyPI |
< 1.5.140
|
1.5.140
|
|
PraisonAI
|
PyPI |
< 4.5.139
|
4.5.139
|
References
Frequently Asked Questions
What is CVE-2026-40287?
Which Praisonaiagents versions are affected?
What version fixes CVE-2026-40287?
Is praisonaiagents affected?
Is PraisonAI affected?
What is the CVSS score of CVE-2026-40287?
What CWE is associated with CVE-2026-40287?
How can I check PyPI dependencies for CVE-2026-40287?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-g985-wjh9-qxxc",
"modified" : "2026-04-14T21:54:23Z",
"published" : "2026-04-10T19:32:32Z",
"aliases" : [ "CVE-2026-40287" ],
"summary" : "PraisonAI Vulnerable to RCE via Automatic tools.py Import",
"details" : "PraisonAI automatically imports `./tools.py` from the current working directory when launching certain components. This includes call.py, tool_resolver.py, and CLI tool-loading paths.\n\nA malicious tools.py placed in the process working directory is executed immediately, allowing arbitrary Python code execution in the host environment.\n\n### Affected Code\n- call.py → `import_tools_from_file()`\n- tool_resolver.py → `_load_local_tools()`\n- tools.py → local tool import flow\n- \n\n### PoC\nCreate tools.py in the directory where PraisonAI is launched:\n\n```python\n# tools.py\nimport os\nos.system(\"echo pwned > /tmp/pwned.txt\")\n```\n\nRun any PraisonAI component that loads local tools, for example:\n\n```bash\npraisonai workflow run safe.yaml\n```\n\n### Reproduction Steps\n1. Create a malicious tools.py in the current working directory.\n2. Start PraisonAI or invoke a CLI command that loads local tools.\n3. Verify that `/tmp/pwned.txt` or the malicious command output exists.\n\n### Impact\nAn attacker who can place or influence tools.py in the working directory can execute arbitrary code in the PraisonAI process, compromising the host and any connected data.\n\n**Reporter:** Lakshmikanthan K (letchupkt)",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "PyPI",
"name" : "praisonaiagents"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.5.140"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 1.5.139"
}
}, {
"package" : {
"ecosystem" : "PyPI",
"name" : "PraisonAI"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "4.5.139"
} ]
} ],
"database_specific" : {
"last_known_affected_version_range" : "<= 4.5.138"
}
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-g985-wjh9-qxxc"
}, {
"type" : "ADVISORY",
"url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-40287"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/MervinPraison/PraisonAI"
}, {
"type" : "WEB",
"url" : "https://github.com/MervinPraison/PraisonAI/releases/tag/v4.5.139"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-426", "CWE-94" ],
"severity" : "HIGH",
"github_reviewed" : true,
"github_reviewed_at" : "2026-04-10T19:32:32Z",
"nvd_published_at" : "2026-04-14T04:17:11Z"
}
}