/

CVE-2026-57129

Severity:

HIGH RISK

(7.5)

Path Traversal (CWE-22) in PraisonAI MentionsParser

CVE-2026-57129

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22

Impact:

Arbitrary File Read and Information Disclosure

Severity:

HIGH RISK

(7.5)

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 MentionsParser can cause file-mention values to resolve outside the intended workspace. When prompt input from users, bots, or workflows is processed, an attacker may read sensitive files accessible to the application process, including credentials, keys, source code, and system configuration.

Affected context

The issue occurs in deployments that use PraisonAI agent workflows with file mentions and permit untrusted or insufficiently constrained prompt content to influence file paths. Risk increases when the process can access sensitive files and the parser falls back to direct path resolution without enforcing workspace boundaries, traversal protections, or symlink restrictions.

Exploit preconditions

  • Attack surface: File-mention processing in agent prompts, bots, or workflows
  • Required access: Ability to supply or influence file-mention values accepted by the application
  • Trigger point: Resolution and processing of a file mention
  • Why exploitation is possible: The parser may resolve a path outside the intended workspace without consistently enforcing traversal, symlink, or boundary validation

Why this happens

The underlying bug is insufficient validation of user-influenced filesystem paths. After workspace-relative resolution does not produce the expected result, the parser falls back to a general path representation without proving that the resulting path remains within an approved directory. This behavior maps to CWE-22: Improper Limitation of a Pathname to a Restricted Directory, because attacker-controlled path input can escape the intended filesystem boundary.

Potential impact

  • An attacker may read credentials, private keys, or environment files
  • The application could disclose source code or internal configuration
  • Sensitive system or service information may be exposed
  • Disclosed secrets could enable follow-on compromise of connected systems

General mitigation guidance

Mitigation generally focuses on treating file-mention values as untrusted filesystem input and enforcing a narrow, explicit access boundary.

Common defensive patterns include:

  • Resolving paths against a fixed workspace and verifying the canonical result remains within that workspace
  • Rejecting traversal components, absolute paths, and symlink escapes where they are not required
  • Allowing access only to explicitly approved files or directories
  • Separating user-provided references from privileged filesystem operations
  • Running agents with least-privilege filesystem permissions and minimal access to secrets
  • Returning controlled errors instead of exposing filesystem details

How teams detect issues like this

Organizations can identify similar issues through:

  • Static analysis for path construction using user-controlled values
  • Code review checks for direct path fallbacks and missing canonical-boundary validation
  • Tests covering traversal components, absolute paths, symlinks, and workspace escape attempts
  • Runtime monitoring for unusual reads of credential, environment, key, or system configuration files
  • Policy enforcement that restricts agent processes to dedicated, least-privilege workspaces
  • Neutral automated code review rules targeting CWE-22 patterns

Sources

SourceLink
github.comgithub.com/MervinPraison/PraisonAI/commit/b4270173d4123fb1ee8910588f0896668ee21b59
github.comgithub.com/MervinPraison/PraisonAI/releases/tag/v4.6.59
github.comgithub.com/MervinPraison/PraisonAI/security/advisories/GHSA-2rcg-mm5h-xchx

Frequently asked

questions

It can be exploitable through an exposed prompt, bot, or workflow interface when untrusted input can influence file-mention values and the process has access to readable files.

The attacker generally needs a way to submit or influence content processed by the MentionsParser. Direct filesystem access is not necessarily required if the application exposes a suitable prompt or automation surface.

Resolve paths against an approved workspace, canonicalize them, and reject any result outside that boundary or subject to disallowed symlink behavior.

Treat all file references from prompts and workflows as untrusted, use allowlisted paths, apply least-privilege filesystem permissions, and test boundary conditions during review and CI.

Find out what's already
exploitable in your codebase.