Categories
CVE-2026-40152

Path Traversal in praisonaiagents (CVE-2026-40152)

Summary

Path traversal in praisonaiagents (CVE-2026-40152). Risk of unauthorized operations or information disclosure. Exploitable via FileTools. Mitigation: upgrade to 1.5.128 or later.

Original description

The description as published by the source.

Summary

The list_files() tool in FileTools validates the directory parameter against workspace boundaries via _validate_path(), but passes the pattern parameter directly to Path.glob() without any validation. Since Python's Path.glob() supports .. path segments, an attacker can use relative path traversal in the glob pattern to enumerate arbitrary files outside the workspace, obtaining file metadata (existence, name, size, timestamps) for any path on the filesystem.

Details

The _validate_path() method at file_tools.py:25 correctly prevents path traversal by checking for .. segments and verifying the resolved path falls within the current workspace. All file operations (read_file, write_file, copy_file, etc.) route through this validation.

However, list_files() at file_tools.py:114 only validates the directory parameter (line 127), while the pattern parameter is passed directly to Path.glob() on line 130:

@staticmethod
def list_files(directory: str, pattern: Optional[str] = None) -> List[Dict[str, Union[str, int]]]:
    try:
        safe_dir = FileTools._validate_path(directory)  # directory validated
        path = Path(safe_dir)
        if pattern:
            files = path.glob(pattern)  # pattern NOT validated — traversal possible
        else:
            files = path.iterdir()

        result = []
        for file in files:
            if file.is_file():
                stat = file.stat()
                result.ap…

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-40152 has been found in praisonaiagents.
Attackers can target a specific entry point like FileTools over the network to misuse the product.
Risk of unauthorized operations or information disclosure.
What to do: upgrade praisonaiagents to 1.5.128 or later.
If unsure, ask your IT team or search "praisonaiagents CVE-2026-40152" on the vendor's site.

CVE-2026-40152 (praisonaiagents) — CWE-22
Attack vector: remote (network-reachable) / unauthenticated / no user interaction
Attack surface: FileTools / directory / pattern / read_file
Patched: 1.5.128 — 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

Path traversal (CWE-22) exists in praisonaiagents. Attackers reach the vulnerable code path via FileTools without authentication.

📍 Affected scope

Check the vendor advisory for the affected versions of praisonaiagents. Attack surface: FileTools / directory / pattern / read_file.

🔥 Severity

Severity: ?. Risk of unauthorized operations or information disclosure.

🔧 How to fix

Update to 1.5.128.

🛡️ 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.128

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

  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.128"}]}]

References

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