ZeroHour

CVE-2026-56839

niche

Path Traversal via Unset Workspace in PraisonAI CODE_TOOLS Prior to 4.6.59

CVSS 3.1
7.3 high
EPSS
Published
()
Modified
AI analysis

PraisonAI, an open-source multi-agent framework, fails to restrict file access in its CODE_TOOLS wrappers when no workspace has been configured: _workspace_root stays None and workspace=None is passed to read_file, search_replace, and apply_diff, which only enforce path containment when a truthy workspace is set. As a result, an application that exposes the code_read_file, code_search_replace, or code_apply_diff tools before calling set_workspace lets attacker-influenced prompts (e.g., via prompt injection) read and modify arbitrary files outside the intended project directory. This yields high confidentiality and integrity impact — arbitrary file disclosure and tampering on the host running the agent — though it requires the application to expose these tools and some user interaction or low privileges, per the CVSS 3.1 vector (7.3, high). Explicitly configured workspaces are unaffected; the flaw only bites deployments that never set a workspace. There is no evidence of exploitation and no public proof of concept.

What to do: Upgrade PraisonAI to 4.6.59 or later, which fixes the workspace enforcement gap. If you build applications on it, always call set_workspace before enabling code_read_file, code_search_replace, or code_apply_diff, and run agents under a dedicated low-privilege OS account with minimal filesystem access. Audit agent transcripts and file logs for any read/write operations targeting paths outside your intended project directory.

Affected
PraisonAI< 4.6.59
Estimated exposure
niche≈thousands to low tens of thousands of developer deployments (PyPI package with modest adoption; exact install counts not published) — PraisonAI is a developer library distributed via PyPI/GitHub rather than an internet-facing appliance, so there are no public scan counts; the estimate is an order-of-magnitude guess from its position as a mid-tier open-source agent…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

PraisonAI is a multi-agent teams system. Prior to 4.6.59, the CODE_TOOLS wrappers keep _workspace_root as None and pass workspace=None to read_file, search_replace, and apply_diff helpers that enforce path containment only for a truthy workspace. An application that exposes code_read_file, code_search_replace, or code_apply_diff before set_workspace can therefore let prompt-influenced calls read and modify files outside the intended project directory, while explicitly configured workspaces remain effective. This vulnerability is fixed in 4.6.59.

Weakness
CWE-22, CWE-200, CWE-863
Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:N

In the news

No ingested article mentions this CVE yet.