/

CVE-2026-57145

Severity:

CRITICAL RISK

(9.1)

Path Traversal (CWE-22) in PraisonAI MultiEdit Tool

CVE-2026-57145

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Read and Write

Severity:

CRITICAL RISK

(9.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

A path traversal vulnerability in PraisonAI's MultiEdit tool allows prompt-influenced agents to use attacker-controlled file paths when reading, comparing, or writing files. If an agent can be induced to process a chosen path and the operating-system process has access to it, the issue may expose secrets, alter application files, or support persistence.

Affected context

The vulnerability occurs in PraisonAI deployments using the MultiEdit tool when an LLM-controlled filepath is passed directly to file operations. Risk is greater when agents can be influenced by untrusted prompts or external content, and when the hosting process has broad filesystem permissions. The affected behavior includes file reading, diff-related access, and file overwriting without effective workspace, symlink, or protected-path boundaries.

Exploit preconditions

  • Attack surface: The PraisonAI MultiEdit tool and its file-reading or file-writing operations
  • Required access: Ability to influence prompts, agent tasks, or other inputs that control the filepath parameter
  • Trigger point: An agent invokes edit or diff behavior with a path selected through LLM-influenced input
  • Why exploitation is possible: File paths are used without sufficient traversal rejection, canonicalization, workspace containment, symlink controls, or protected-path enforcement

Why this happens

The underlying bug is a failure to constrain an externally influenced filesystem path before using it in open operations. Without canonical path resolution and authorization checks, relative traversal, symlink-mediated paths, or absolute paths may escape the intended workspace. This maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, commonly known as path traversal.

Potential impact

  • Sensitive files may be read and disclosed
  • Credentials, tokens, or configuration secrets could be exposed
  • Accessible application files may be overwritten or corrupted
  • An attacker could alter code, configuration, or operational data
  • Persistence or application tampering may be established
  • The host process or connected services could be exposed to follow-on compromise

General mitigation guidance

Mitigation generally focuses on treating agent-selected paths as untrusted authorization requests rather than trusted filenames.

Common defensive patterns include:

  • Restricting all file operations to an explicitly configured workspace
  • Canonicalizing paths and verifying that the resolved result remains within the permitted directory
  • Rejecting traversal components, absolute paths, and unsafe symlink resolutions
  • Maintaining explicit protected-path and file-type policies
  • Using allowlisted operations and secure-by-default workspace settings
  • Reducing the process account's filesystem permissions and separating sensitive files from agent-accessible storage
  • Requiring human or policy approval for writes outside narrowly defined project locations

How teams detect issues like this

Organizations can look for this weakness through:

  • Static analysis rules that identify LLM-controlled or user-controlled values passed to file APIs
  • Code review checks for missing canonicalization, containment validation, and symlink handling
  • Tests covering traversal components, absolute paths, symlink escapes, and protected locations
  • Runtime telemetry for agent-initiated file access outside approved workspaces
  • Policy enforcement that denies file operations unless the resolved path matches an allowlisted root
  • Automated security review tools that flag unvalidated path construction and filesystem access

Sources

SourceLink
github.comgithub.com/MervinPraison/PraisonAI/commit/2a855c470077c7d2e2479a575f7ef7f548d51c33
github.comgithub.com/MervinPraison/PraisonAI/releases/tag/v4.6.62
github.comgithub.com/MervinPraison/PraisonAI/security/advisories/GHSA-29w3-p9w9-wc47

Frequently asked

questions

Exploitability depends on how PraisonAI is deployed. It may be reachable through a remote prompt or agent interface when untrusted users or content can influence tool inputs, but the resulting access is limited by the permissions of the hosting process.

An attacker generally needs a way to influence the filepath selected by an agent, such as prompt-controlled task input or another connected content source. Direct operating-system access is not necessarily required when the agent interface is exposed.

Enforce a canonical, workspace-bound allowlist before every read, diff, or write operation, while rejecting traversal and unsafe symlink resolutions. Protected paths should remain inaccessible even when the process can technically read or write them.

Treat all agent-generated paths as untrusted, apply least-privilege filesystem permissions, test boundary conditions in CI, and enforce runtime policies that limit tools to approved directories and operations.

Find out what's already
exploitable in your codebase.