/

CVE-2026-55527

Severity:

HIGH RISK

(7.1)

Path Traversal (CWE-22) in PraisonAI FileMemory Storage

CVE-2026-55527

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22, CWE-73

Impact:

Arbitrary File Write

Severity:

HIGH RISK

(7.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 FileMemory component allows an attacker-controlled user ID to influence the location where memory JSON data is written. If the caller can supply crafted path components such as parent-directory references or separators, data may be written to arbitrary locations that the process can access.

Affected context

The issue occurs in deployments using the FileMemory constructor before the affected security fix. It becomes risky when user IDs originate from untrusted callers and are incorporated directly into memory paths without normalization or containment checks. The resulting path may escape the intended memory directory and target other process-writable locations.

Exploit preconditions

  • Attack surface: The FileMemory API or another application path that accepts caller-controlled user IDs
  • Required access: Ability to provide or influence the user_id value
  • Trigger point: Construction of a FileMemory instance followed by JSON data persistence
  • Why exploitation is possible: The user ID is joined into the storage path without sufficient sanitization or verification that the resolved path remains inside the intended directory

Why this happens

The underlying bug is path construction based on untrusted input. When a user-controlled identifier is concatenated with a trusted base directory, traversal sequences or path separators can alter the resolved destination.

This maps primarily to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'). The related CWE-73: External Control of File Name or Path also applies because an external value controls a filesystem path without adequate validation or confinement.

Potential impact

  • An attacker may write or overwrite JSON data in process-writable locations
  • Application state, configuration, or operational data could be modified
  • The process may experience data corruption or denial of service
  • Written content could be used to influence later application behavior
  • In permissive environments, the issue could contribute to broader compromise

General mitigation guidance

Mitigation generally focuses on treating identifiers as data rather than filesystem syntax.

Common defensive patterns include:

  • Sanitizing or canonicalizing user-controlled identifiers before path construction
  • Allowing only a constrained identifier format when directory names are required
  • Resolving the final path and verifying that it remains within the designated storage root
  • Using secure-by-default storage abstractions that do not expose raw path composition
  • Separating user data into controlled namespaces with least-privilege filesystem permissions
  • Reducing process write access to sensitive directories and files
  • Avoiding reliance on validation alone when the underlying filesystem operation can be constrained

How teams detect issues like this

Organizations can look for this class of issue through:

  • Static analysis rules that flag filesystem path APIs receiving external input
  • Code review checks for direct joining or concatenation of user IDs with directory paths
  • Tests using traversal markers, separators, absolute paths, and platform-specific path forms
  • Runtime policies that restrict application write locations
  • Monitoring for writes outside the expected memory directory
  • Automated security review tools that identify CWE-22 and CWE-73 patterns

Sources

SourceLink
github.comgithub.com/MervinPraison/PraisonAI/commit/2f9677abb2ea68eab864ee8b6a828fd0141612e1
github.comgithub.com/MervinPraison/PraisonAI/releases/tag/v4.6.58
github.comgithub.com/MervinPraison/PraisonAI/security/advisories/GHSA-gxmw-5f7x-6g22

Frequently asked

questions

It can be exploitable through a remote or application-level interface when that interface permits an attacker to control the FileMemory user_id. Exploitability depends on how PraisonAI is exposed and how caller input is authorized.

The attacker needs a path that reaches the vulnerable FileMemory constructor and the ability to influence the associated user ID. The process must also have write permission for the targeted location.

Use strict identifier validation together with canonical path resolution and containment checks. A secure storage abstraction that prevents callers from selecting arbitrary paths is preferable.

Treat all externally supplied path components as untrusted, enforce filesystem least privilege, test path-boundary conditions, and apply static analysis or code review policies to path construction.

Find out what's already
exploitable in your codebase.