CVE-2026-40287: PraisonAI Vulnerable to RCE via Automatic tools.py Import
PraisonAI automatically imports ./tools.py from the current working directory when launching certain components. This includes call.py, toolresolver.py, and CLI tool-loading paths. A malicious tools.py placed in the process working directory is executed immediately, allowing arbitrary Python code execution in the host environment.
Published Apr 10, 2026 · Updated Apr 14, 2026
Affected packages
praisonaiagents
- Ecosystem
- PyPI
- Affected
- <= 1.5.139
- Fixed in
- 1.5.140
- Check
pip show praisonaiagents
PraisonAI
- Ecosystem
- PyPI
- Affected
- <= 4.5.138
- Fixed in
- 4.5.139
- Check
pip show PraisonAI
Advisory details
From the GitHub Advisory Database (CC BY 4.0).
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.
A malicious tools.py placed in the process working directory is executed immediately, allowing arbitrary Python code execution in the host environment.
Affected Code
- call.py →
import_tools_from_file() - tool_resolver.py →
_load_local_tools() - tools.py → local tool import flow
PoC
Create tools.py in the directory where PraisonAI is launched:
# tools.py
import os
os.system("echo pwned > /tmp/pwned.txt")Run any PraisonAI component that loads local tools, for example:
praisonai workflow run safe.yamlReproduction Steps
- Create a malicious tools.py in the current working directory.
- Start PraisonAI or invoke a CLI command that loads local tools.
- Verify that
/tmp/pwned.txtor the malicious command output exists.
Impact
An 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.
Reporter: Lakshmikanthan K (letchupkt)
Credited to l3tchupkt.
References
How this page is made: the data panel comes from the GitHub Advisory Database, CISA’s KEV catalog, the NVD and FIRST EPSS, and updates twice a day. No analysis has been written for this entry yet. Methodology
More PyPI vulnerabilities
All PyPI entriesCVE-2026-60087
PraisonAI: Human-in-the-loop tool approval is cached by tool name and silently reused for all subsequent calls with arbitrary arguments
medium6.1Oct 8, 2026CVE-2026-60089
PraisonAI: Project config can auto-save agent output outside the project root
medium6.9Oct 8, 2026CVE-2026-61430
PraisonAI: DNS rebinding bypass in `web_crawl` SSRF protection allows internal response disclosure
high8.5Oct 8, 2026CVE-2026-61432
PraisonAI: FastContext path resolution permits absolute and traversal reads outside the workspace
medium5.7Oct 8, 2026CVE-2026-61437
PraisonAI: Unsafe Dynamic Module Loading Leads to Arbitrary Code Execution via tools.py in AgentFlow
high7.8Oct 8, 2026CVE-2026-61443
PraisonAI: SkillTools Executes Scripts Without Path Containment Validation
high8.1Oct 8, 2026
