/

CVE-2026-56833

Severity:

HIGH RISK

(7.5)

Path Traversal (CWE-22) in PraisonAI Dynamic Context

CVE-2026-56833

Deferred

Vulnerability type

Category:

Path Traversal

CWE:

CWE-22, CWE-200

Impact:

Unauthorized file 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 Dynamic Context tools allows lower-trust callers to use crafted run_id or agent_id values to access files outside the configured storage directory. Under deployments where untrusted prompts or users can invoke these agent-callable tools, attackers may read history and terminal-log files containing sensitive information.

A path traversal vulnerability in PraisonAI's Dynamic Context tools allows lower-trust callers to use crafted run_id or agent_id values to access files outside the configured storage directory. Under deployments where untrusted prompts or users can invoke these agent-callable tools, attackers may read history and terminal-log files containing sensitive information.

Affected context

The issue occurs in PraisonAI Dynamic Context deployments that store agent history and terminal logs on the filesystem and expose agent-callable tool factories accepting caller-controlled identifiers. It becomes risky when those identifiers are incorporated into file paths without confinement to the configured base directory, especially where lower-trust users or prompts can invoke the tools.

The issue occurs in PraisonAI Dynamic Context deployments that store agent history and terminal logs on the filesystem and expose agent-callable tool factories accepting caller-controlled identifiers. It becomes risky when those identifiers are incorporated into file paths without confinement to the configured base directory, especially where lower-trust users or prompts can invoke the tools.

Exploit preconditions

  • Attack surface: Agent-callable Dynamic Context history and terminal-log tools
  • Required access: Permission to invoke the exposed tools, directly or through an agent interaction
  • Trigger point: Filesystem access using caller-supplied run_id or agent_id values
  • Why exploitation is possible: The underlying stores accept absolute paths and traversal sequences instead of restricting resolved paths to the configured Dynamic Context directory
  • Attack surface: Agent-callable Dynamic Context history and terminal-log tools
  • Required access: Permission to invoke the exposed tools, directly or through an agent interaction
  • Trigger point: Filesystem access using caller-supplied run_id or agent_id values
  • Why exploitation is possible: The underlying stores accept absolute paths and traversal sequences instead of restricting resolved paths to the configured Dynamic Context directory

Why this happens

The vulnerability results from constructing filesystem paths by joining trusted storage locations with insufficiently constrained user-controlled identifiers. Absolute-path handling and parent-directory traversal can cause the resulting path to escape the intended base directory. This maps primarily to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), with CWE-200: Exposure of Sensitive Information to an Unauthorized Actor describing the resulting information disclosure.

The vulnerability results from constructing filesystem paths by joining trusted storage locations with insufficiently constrained user-controlled identifiers. Absolute-path handling and parent-directory traversal can cause the resulting path to escape the intended base directory. This maps primarily to CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), with CWE-200: Exposure of Sensitive Information to an Unauthorized Actor describing the resulting information disclosure.

Potential impact

  • An attacker may read .jsonl history files outside the configured Dynamic Context directory.
  • An attacker may access terminal .log files containing sensitive operational data.
  • Exposed files could reveal credentials, prompts, tool results, or internal system information.
  • The disclosure could support further compromise or targeted attacks against connected services.
  • An attacker may read .jsonl history files outside the configured Dynamic Context directory.
  • An attacker may access terminal .log files containing sensitive operational data.
  • Exposed files could reveal credentials, prompts, tool results, or internal system information.
  • The disclosure could support further compromise or targeted attacks against connected services.

General mitigation guidance

Mitigation typically focuses on treating tool arguments as untrusted data and enforcing filesystem confinement at the storage boundary.

Common defensive patterns include:

  • Rejecting absolute paths and traversal components in identifiers intended to name stored objects.
  • Resolving candidate paths and verifying that they remain beneath the intended base directory.
  • Allowing only canonical, schema-constrained identifiers rather than arbitrary path fragments.
  • Using opaque server-generated references instead of caller-selected filesystem names.
  • Applying least-privilege filesystem permissions and limiting the process view of sensitive directories.
  • Separating agent-visible storage from credentials, host logs, and other unrelated application data.

These controls reduce exposure even when a caller can invoke the tools with unexpected values.

Mitigation typically focuses on treating tool arguments as untrusted data and enforcing filesystem confinement at the storage boundary.

Common defensive patterns include:

  • Rejecting absolute paths and traversal components in identifiers intended to name stored objects.
  • Resolving candidate paths and verifying that they remain beneath the intended base directory.
  • Allowing only canonical, schema-constrained identifiers rather than arbitrary path fragments.
  • Using opaque server-generated references instead of caller-selected filesystem names.
  • Applying least-privilege filesystem permissions and limiting the process view of sensitive directories.
  • Separating agent-visible storage from credentials, host logs, and other unrelated application data.

These controls reduce exposure even when a caller can invoke the tools with unexpected values.

How teams detect issues like this

Organizations can detect this class of issue through:

  • Static analysis rules for filesystem joins involving tool arguments or other request-controlled values.
  • Code review checks for missing absolute-path rejection, traversal validation, and base-directory containment checks.
  • Dynamic tests using parent-directory segments, absolute paths, encoded separators, and symlink-related edge cases.
  • Runtime monitoring for file access outside approved Dynamic Context directories.
  • Policy enforcement requiring canonical-path validation and least-privilege service accounts.

Automated security review tools may help identify path construction patterns, but results should be validated against the application's filesystem behavior.

Organizations can detect this class of issue through:

  • Static analysis rules for filesystem joins involving tool arguments or other request-controlled values.
  • Code review checks for missing absolute-path rejection, traversal validation, and base-directory containment checks.
  • Dynamic tests using parent-directory segments, absolute paths, encoded separators, and symlink-related edge cases.
  • Runtime monitoring for file access outside approved Dynamic Context directories.
  • Policy enforcement requiring canonical-path validation and least-privilege service accounts.

Automated security review tools may help identify path construction patterns, but results should be validated against the application's filesystem behavior.

Sources

SourceLink
github.comgithub.com/MervinPraison/PraisonAI/security/advisories/GHSA-22cj-m4wf-fv2c

Frequently asked

questions

It can be exploitable through an application or agent interface when a lower-trust user or prompt is allowed to invoke the affected tools. The exact reach depends on how PraisonAI is deployed and exposed.

An attacker generally needs access to a tool-calling path or an agent interaction that permits the relevant history or terminal-log tools to receive crafted identifiers.

Validate identifiers as non-path data, reject absolute and traversal-based values, and verify after canonicalization that every resolved path remains within the intended storage directory.

Treat all tool arguments as untrusted, use server-controlled opaque identifiers, apply least-privilege filesystem permissions, and include traversal-focused tests and static checks in the development process.

It can be exploitable through an application or agent interface when a lower-trust user or prompt is allowed to invoke the affected tools. The exact reach depends on how PraisonAI is deployed and exposed.

An attacker generally needs access to a tool-calling path or an agent interaction that permits the relevant history or terminal-log tools to receive crafted identifiers.

Validate identifiers as non-path data, reject absolute and traversal-based values, and verify after canonicalization that every resolved path remains within the intended storage directory.

Treat all tool arguments as untrusted, use server-controlled opaque identifiers, apply least-privilege filesystem permissions, and include traversal-focused tests and static checks in the development process.

Find out what's already
exploitable in your codebase.