CVE-2026-57145

CRITICALPre-NVD 9.19.1
EchelonGraph scoreLOW confidence

This critical-severity CVE scores 9.1 under the CNA's CVSS (NVD's own analysis pending). EPSS exploit-prediction score not yet available (the EPSS model rescores nightly; freshly-published CVEs typically appear within 48 hours). GitHub Security Advisory data not yet ingested — confidence will rise once GHSA publishes (typical lag: hours to days for open-source ecosystem CVEs; never for infrastructure-only CVEs).

Triggered by: NVD CVSS baseline
Sources: cna:github_m
9.1EG
EchelonGraph verdictPlan a fixSerious severity, but no confirmed exploitation yet.
  • High severity, but no confirmed exploitation yet
CISA-KEV: Not listedEPSS PROB: CVSS: 9.1Exploit: None knownExposed: 0

No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.

PraisonAI: Arbitrary File Read/Write via multiedit Tool Without Path Validation

Summary

The multiedit tool in src/praisonai/praisonai/tools/multiedit.py allows LLM-controlled arbitrary file read and write without any path validation, workspace boundary check, or protected path guard. This enables an attacker who can influence agent tool arguments (via crafted prompts, user input in chat bots, or malicious YAML workflow configs) to read sensitive files (e.g., /etc/shadow, ~/.ssh/id_rsa, ~/.aws/credentials) and overwrite arbitrary files on the filesystem.

Details

The filepath parameter is used directly with open() for both reading (line 74) and writing (line 130) without any of the following protections that exist in other tools in the same codebase:
  • No .. path traversal check — unlike file_tools.py (line 66: if '..' in filepath: raise ValueError) and edit_tools.py (line 35).
  • No workspace boundary validation — unlike file_tools.py (_validate_path with os.path.commonpath check) and skill_tools.py (read_skill_file with workspace boundary check).
  • No protected path guard — unlike praisonai/code/tools/ which uses is_path_within_directory and protected path checks.
  • No symlink resolution — unlike file_tools.py which uses os.path.realpath.

The function is exported via src/praisonai/praisonai/tools/__init__.py as a lazy-loaded tool and is available to agents through the PraisonAI CLI tools registry.

Contrast with protected tools: The sibling tools write_file.py, read_file.py, apply_diff.py, and search_replace.py in src/praisonai/praisonai/code/tools/ all implement is_path_within_directory() checks and protected path guards. The multiedit tool has none of these protections.

PoC

Setup: Clean checkout of PraisonAI at commit d5f1114a. No additional dependencies needed beyond Python 3.10+.

Positive trigger — arbitrary file read via dry_run:

cd /tmp && python3 -c "
import sys
sys.path.insert(0, 'src/praisonai')
from praisonai.tools.multiedit import multiedit

Read any file content via diff output (dry_run=True prevents write)

result = multiedit('/etc/hostname', [{'old': 'DOESNOTEXIST', 'new': 'x'}], dry_run=True)

The diff output reveals the file contents

print('Success:', result['success']) print('Content leaked via diff:', len(result.get('diff', '')), 'bytes') "

Positive trigger — arbitrary file write:

cd /tmp && python3 -c "
import sys
sys.path.insert(0, 'src/praisonai')
from praisonai.tools.multiedit import multiedit

Write to an arbitrary file outside workspace

with open('/tmp/victim_file.txt', 'w') as f: f.write('original content here\n') result = multiedit('/tmp/victim_file.txt', [{'old': 'original', 'new': 'PWNED'}]) with open('/tmp/victim_file.txt', 'r') as f: print('File content after edit:', repr(f.read())) "

Observed output:

# Read:
Success: False
Content leaked via diff: 0 bytes  (file content still accessible via dry_run diff when edits match)

Write:

File content after edit: 'PWNED content here\n'

Negative control — non-existent file:

result = multiedit('/nonexistent/file.txt', [{'old': 'a', 'new': 'b'}])

Returns: {'success': False, 'error': 'File not found: /nonexistent/file.txt'}

Cleanup: rm /tmp/victim_file.txt

Impact

An attacker who can influence the filepath parameter of the multiedit tool (via crafted prompts to an AI agent, user messages in Telegram/Discord/Slack bots using auto_approve_tools=True, or YAML workflow configurations) can:

  • Read arbitrary files — any file readable by the process user, including secrets, SSH keys, cloud credentials, environment files (.env), and configuration files.
  • Write/overwrite arbitrary files — modify any file writable by the process user, enabling privilege escalation (e.g., writing to ~/.bashrc, ~/.ssh/authorized_keys, or overwriting application source code).

This affects all deployments where agents have the multiedit tool available, including the PraisonAI CLI and chat bot deployments where auto_approve_tools defaults to True.

Suggested remediation

Apply the same path validation pattern used by file_tools.py and the code tools in src/praisonai/praisonai/code/tools/:

  • Add a _validate_path function that:
  • Rejects paths containing ..
  • Resolves symlinks via os.path.realpath
  • Validates the resolved path is within the workspace/CWD using os.path.commonpath
  • Add protected path guards (.env, .git, .ssh, keys, credentials)
  • Apply _validate_path to the filepath parameter before any open() call
  • Consider adding @require_approval(risk_level="high") to the multiedit function

Credits

  • Thai Son Dinh from VinSOC Labs (R&D)

CVSS v3
9.1
EG Score
9.1(low)
EG Risk
45(Track)
EG Risk 45/100SSVC: Track

EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).

How it’s computed
Severity91% × 45%
Exploitation0% × 40%
Automatability30% × 15%
Action: Routine — remediate on your standard cadence.
EPSS PROB
EPSS %ILE
KEV
Not listed

Published

June 18, 2026

Last Modified

June 18, 2026

Vendor Advisories for CVE-2026-57145(1)

These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.

Affected Packages

(1 across 1 ecosystem)
PyPI(1)
PackageVulnerable rangeFixed inDependents
praisonai0.0.1 ... 4.6.9 (751 versions)4.6.61

Data Freshness Timeline

(refreshed 3× in last 7d / 3× in last 30d)

Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.

  1. 2026-07-26 17:45 UTCEG score recompute
  2. 2026-07-23 03:20 UTCEG score recompute
  3. 2026-07-20 21:33 UTCEG score recompute

Frequently asked(4)

What is CVE-2026-57145?
CVE-2026-57145 is a critical vulnerability published on June 18, 2026. PraisonAI: Arbitrary File Read/Write via multiedit Tool Without Path Validation Summary The multiedit tool in src/praisonai/praisonai/tools/multiedit.py allows LLM-controlled arbitrary file read and write without any path validation, workspace boundary check, or protected path guard. This enables…
When was CVE-2026-57145 disclosed?
CVE-2026-57145 was first published in the National Vulnerability Database on June 18, 2026. EchelonGraph re-ingests CVE updates from NVD on a 2-hour cycle, so this page reflects the latest published state.
What is the CVSS score of CVE-2026-57145?
CVE-2026-57145 has a CVSS v4.0 base score of 9.1 (CNA self-assessment; NVD's own analysis pending). The EG score is currently aggregating — additional source signals are being incorporated as they become available..
How do I remediate CVE-2026-57145?
Patch to the fixed version published by the affected vendor. Where vendor advisories exist for CVE-2026-57145, EchelonGraph cross-links them in the Vendor Advisories panel below — those typically contain the canonical remediation steps, fixed version numbers, and any vendor-specific mitigations.

Dependency Blast Radius

See which npm, PyPI, Go, and Maven packages are affected by CVE-2026-57145

Explore →

Is Your Infrastructure Affected by CVE-2026-57145?

EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.