Categories
CVE-2026-40287

Vulnerability in praisonaiagents (CVE-2026-40287)

Summary

Vulnerability in praisonaiagents (CVE-2026-40287). Successful exploitation can lead to full system takeover. Mitigation: upgrade to 1.5.140 or later.

Original description

The description as published by the source.

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.yaml

Reproduction Steps

  1. Create a malicious tools.py in the current working directory.
  2. Start PraisonAI or invoke a CLI command that loads local tools.
  3. Verify that /tmp/pwned.txt or 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)

Source: OSV.dev (Open Source Vulnerabilities) NVD GitHub Advisory OSV

Auto-generated summary

Assembled by SecPulse from the source data (CVSS, CWE, affected versions) using templates — no AI involved. Check the original description and references below for exact details.

A vulnerability tracked as CVE-2026-40287 has been found in praisonaiagents.
Successful exploitation can lead to full system takeover.
What to do: upgrade praisonaiagents to 1.5.140 or later.
If unsure, ask your IT team or search "praisonaiagents CVE-2026-40287" on the vendor's site.

CVE-2026-40287 (praisonaiagents) — CWE-426
Attack vector: local / unauthenticated / no user interaction
Patched: 1.5.140 — apply immediately
Plan: 1) Audit SBOM/dependencies, 2) Stage→prod upgrade, 3) Add WAF/proxy monitoring on affected endpoints, 4) Hunt IOCs in logs.
Refs: see the GHSA / vendor advisory / patched release linked on this page.

❓ What is the problem

A vulnerability (CWE-426) exists in praisonaiagents.

📍 Affected scope

Check the vendor advisory for the affected versions of praisonaiagents.

🔥 Severity

Severity: ?. Successful exploitation can lead to full system takeover.

🔧 How to fix

Update to 1.5.140.

🛡️ Workaround

Until the patch is applied: disable the affected feature, apply WAF rules, or restrict access via network ACLs.

🔍 Detection

Search webserver/proxy logs for unusual request patterns matching this CVE's known IOCs. Run grep -r 'praisonaiagents' . against your dependency files (package-lock.json, requirements.txt, go.sum) to find affected services.

Response actions

Concrete steps and command examples for SOC/SRE teams to execute in order

  1. 1
    Identify exposure identify
    grep -r 'praisonaiagents' . | grep -v node_modules

    リポジトリと本番環境の依存ファイル (package-lock.json / requirements.txt / go.sum / Gemfile.lock 等) で praisonaiagents を grep し、稼働しているサービス・バージョンを把握する。

  2. 2
    Apply patch patch
    Upgrade praisonaiagents to 1.5.140

    ステージング環境で 1.5.140 に上げて回帰テスト → 本番反映。回帰テストはアプリの主要ハッピーパスを含めること。

  3. 3
    Post-deployment verification verify
    Confirm patched version is live in production

    パッチ適用後、ステージングで PoC または同等の悪用パターンを再現して脆弱性が閉じたことを確認。本番ではアクセスログ・WAF でアラート再発が無いか継続監視。

Affected packages

PyPI praisonaiagents
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"1.5.140"}]}]
PyPI praisonai
[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"4.5.139"}]}]

References

We use cookies for analytics and ad measurement. This setting applies to all Game co., Ltd. sites. Details