Skip to main content

PraisonAI CVE-2026-55540

| EUVDEUVD-2026-65512 HIGH
Path Traversal (CWE-22)
2026-08-25 https://github.com/MervinPraison/PraisonAI GHSA-ch89-h4r2-c8f8
7.1
CVSS 3.1 · Vendor: https://github.com/MervinPraison/PraisonAI
View

Attack ChainAIDerived

Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain

  1. Access
    Deliver prompt injection via untrusted document or user input
  2. Delivery
    Agent invokes list_files('../outside') unchecked
  3. Exploit
    Enumerate files outside workspace boundary
  4. Execution
    Read secrets via in-workspace symlink targeting outside file
  5. Persist
    Write or execute payload via execute_command with escaped cwd
  6. Impact
    Exfiltrate or persist changes outside workspace

Vulnerability Assessment

Weakness
CWE
OWASP Top 10:2025
A01:2025 - Broken Access Control
ASVS 5.0
V5 - File Handling Path canonicalization, traversal prevention
MITRE ATT&CK

2 techniques across 2 tactics: Discovery, Collection

The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up.

Exploitation Conditions

Exploitation requires that CODE_TOOLS are attached to a PraisonAI agent and the agent is configured with a workspace parameter (i.e., the operator has intentionally engaged the boundary). The attacker must be able to influence the arguments passed to the vulnerable tools - either through direct prompt injection (untrusted user input to an exposed agent), indirect prompt injection (malicious content in a file or document the agent processes as part of a task), or access to a server-exposed agent endpoint. For the list_files and execute_command cwd bypasses (CWE-22), no filesystem precondition is required beyond agent access - supplying a path containing '../' is sufficient. For the symlink bypass (CWE-59), a symlink must exist inside the workspace pointing outside it; this can be pre-staged if the attacker has any write access to the workspace directory, or planted by the agent itself if it can be prompted to create symlinks. Exploitation is constrained to the process user's filesystem permissions - root-owned files are not reachable from a low-privilege process. Shell metacharacters do not work because execute_command uses subprocess.run without shell=True, but arbitrary available binaries can be executed from the escaped working directory with attacker-controlled argv. Deployments that do not attach CODE_TOOLS to agents, or that do not configure a workspace parameter, are not affected by this boundary bypass.

Impact

The CVSS 3.1 vector AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L reflects a network-reachable agent endpoint where exploitation requires the agent to process attacker-influenced input - consistent with indirect prompt injection scenarios. AC:H and UI:R together capture the dependency on agent state and input routing, not a simple network request. No EPSS score was present in the source data; no CISA KEV listing exists, so active exploitation is unconfirmed. However, a self-contained proof of concept demonstrating all three bypass vectors is included in the advisory, substantially lowering the exploitation bar - any operator deploying CODE_TOOLS agents that process untrusted input should treat this as urgent regardless of team size. The three vectors are independent: the list_files and execute_command cwd bypasses require no symlink setup and only the ability to influence tool arguments via prompt injection, while the symlink bypass requires a link to exist inside the workspace. The availability impact is rated low because the primary concern is confidentiality and integrity loss rather than service disruption. This is not a theoretical high-CVSS-low-real-risk finding - the PoC is public, the bypass is straightforward for the list_files and execute_command vectors, and the workspace boundary is the sole security control the module advertises.

Exploit ScenarioDerived

An attacker embeds a prompt injection payload in a document processed by a PraisonAI coding agent (e.g., a malicious README or source file the agent reads during a task), instructing the agent to call list_files('../sensitive_config') to enumerate files outside the workspace, then read a credentials file via a symlink previously planted inside the workspace pointing to an adjacent secrets directory. A self-contained proof of concept included in the advisory demonstrates this chain working end-to-end, including file creation outside the workspace via execute_command with cwd='../outside'.

This Week Schedule remediation this week. Why: HIGH severity (CVSS 7.0-8.9).
Patch available 0.3% exploitation probability (EPSS)

Get an e-mail when this CVE is exploited, patched or re-scored. Free account.

Alert me

AnalysisAIv1 – Aug 25, 2026

Workspace boundary escape in PraisonAI's praisonai.code CODE_TOOLS exposes three independent path traversal vectors affecting all file operation and command execution tools exported for use by AI agents. Agents configured with a workspace parameter - intended as a filesystem security boundary - can be manipulated via prompt injection or untrusted input to read, write, enumerate, and execute commands outside that boundary, bounded only by the process user's OS permissions. Publicly available proof-of-concept code demonstrates all six bypass paths against real praisonai.code agent tools; no CISA KEV listing exists at time of analysis.

RemediationAI

Upgrade the praisonai pip package to version 4.6.58 or later, which resolves all three bypass vectors per commit 2f9677abb2ea68eab864ee8b6a828fd0141612e1 and is documented in advisory GHSA-ch89-h4r2-c8f8 at https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-ch89-h4r2-c8f8 and the release at https://github.com/MervinPraison/PraisonAI/releases/tag/v4.6.58. If immediate upgrade is not feasible, compensating controls include: restricting the OS user running the agent to minimal filesystem permissions to limit the blast radius of any bypass; removing list_files and execute_command from the agent's attached tool set when the workspace boundary is a security requirement, noting this degrades agent functionality; avoiding creation or presence of symlinks inside the workspace directory to prevent the CWE-59 vector; and not exposing CODE_TOOLS agents to untrusted or externally-supplied input until the patch is applied. These controls mitigate individual vectors but do not close all three simultaneously - patching remains the only complete fix.

Affected VersionsENISA

PraisonAI < 4.6.58

Affected Packages

pypi praisonai fix: 4.6.58

Source: OSV (Open Source Vulnerabilities)

Affects your stack

Affects 1 package in pypi

Checking this CVE against your own stacks and servers is part of the Basic plan and up.

Technical ContextAI · show details

PraisonAI (pip package praisonai, CPE: pkg:pip/praisonai) provides a praisonai.code module exporting CODE_TOOLS - a set of file operation wrappers (read_file, write_file, apply_diff, search_replace, list_files) and execute_command - designed for attachment to AI agents. The workspace parameter is asserted by the module itself as a path-traversal security boundary with explicit comments such as 'Security check - ensure path is within workspace'. Three independent root causes undermine this boundary. First, the containment helper is_path_within_directory() uses os.path.abspath() rather than os.path.realpath() or Path.resolve(), so a symlink inside the workspace whose target is outside passes the startswith() check (CWE-59: Improper Link Resolution Before File Access). Second, list_files() resolves the path against the workspace but never calls the containment helper, allowing ../ sequences and absolute paths to escape directly (CWE-22: Path Traversal). Third, execute_command() documents its workspace parameter as 'for security validation' but performs no cwd containment check, and code_execute_command() joins a relative cwd against the workspace root without validating the result (CWE-22). The fix in v4.6.58 replaces os.path.abspath() with realpath()-based canonicalization and applies the containment check consistently across all tool surfaces.

Know when Python gets its next vulnerability

  • Watch products and get an email when something new is published
  • Check this CVE against your own stack and servers
  • Exploit and PoC references, threat intelligence from 22 sources

No credit card · 7-day full trial

Severity by source

Vendor (https://github.com/MervinPraison/PraisonAI) PRIMARY 7.1 HIGH
AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L
vuln.today AI 7.1 HIGH

AV:N for network-exposed agent endpoints; AC:H and UI:R because exploitation depends on agent processing attacker-influenced input and invoking vulnerable tools; PR:N as no attacker credential is required; C:H/I:H for full outside-workspace read/write; A:L for limited availability impact.

3.1 AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L
4.0 AV:N/AC:H/AT:P/PR:N/UI:P/VC:H/VI:H/VA:L/SC:N/SI:N/SA:N

Primary rating from Vendor (https://github.com/MervinPraison/PraisonAI).

CVSS VectorVendor: https://github.com/MervinPraison/PraisonAI

Attack Vector
Network
Attack Complexity
High
Privileges Required
None
User Interaction
Required
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
Low

DescriptionCVE.org

Summary

PraisonAI's praisonai.code tool wrappers (exported as CODE_TOOLS for agents) expose a workspace setting that the module itself treats as a path-traversal security boundary - read_file, write_file, apply_diff, and search_replace explicitly call is_path_within_directory() and return "… is outside the workspace" on violations. That boundary is enforced unsoundly and inconsistently:

  1. The containment helper uses os.path.abspath(), not realpath()/Path.resolve(). A symlink located inside the workspace whose target is outside has an abspath() that is still inside the workspace, so it passes the check while open() follows the link. This bypasses read, write, apply_diff, and search_replace (CWE-59).
  2. list_files() resolves path against the workspace but never calls the containment helper at all - ../ and absolute paths escape directly (CWE-22).
  3. execute_command() takes a workspace argument documented "for security validation" but performs no cwd containment check; code_execute_command() resolves a relative cwd against the workspace and also never validates it (and never even passes workspace to the low-level helper). A relative cwd="../outside" runs commands from outside the workspace (CWE-22).

An attacker who can influence an agent that has these tools attached (untrusted prompt, indirect prompt injection, or a server-exposed agent) can read, overwrite, list, and execute from outside the configured workspace, bounded only by the process user's filesystem permissions.

Technical Detail

1. Unsound containment helper (symlink bypass - CWE-59)

python
# src/praisonai/praisonai/code/utils/file_utils.py - is_path_within_directory()
abs_file = os.path.abspath(file_path)
# does NOT resolve symlinks
abs_dir  = os.path.abspath(directory)
if not abs_dir.endswith(os.sep): abs_dir += os.sep
return abs_file.startswith(abs_dir) or abs_file == abs_dir.rstrip(os.sep)

read_file/write_file/apply_diff/search_replace call this with the configured workspace (e.g. read_file.py: `

Security check - ensure path is within workspace). Because abspath() does not canonicalize symlinks, a link at WORKSPACE/link_to_secret.txt → /outside/secret.txt has abspath WORKSPACE/link_to_secret.txt (inside) and passes, while open()` follows it to the real outside target.

2. list_files() has no containment check (CWE-22)

python
# src/praisonai/praisonai/code/tools/list_files.py
if workspace and not os.path.isabs(path):
    abs_path = os.path.abspath(os.path.join(workspace, path))
# ../ collapses out of workspace
else:
    abs_path = os.path.abspath(path)
# absolute path used as-is
# ... os.path.isdir(abs_path) then listed. is_path_within_directory() is NEVER called.

3. execute_command() never validates cwd (CWE-22)

python
# src/praisonai/praisonai/code/tools/execute_command.py - workspace param doc: "for security validation"
if cwd:
    if workspace and not os.path.isabs(cwd):
        work_dir = os.path.abspath(os.path.join(workspace, cwd))
# ../ escapes; no containment check
    else:
        work_dir = os.path.abspath(cwd)
# subprocess.run(args, cwd=work_dir, ...)
# no is_path_within_directory() anywhere
python
# src/praisonai/praisonai/code/agent_tools.py - code_execute_command()
if work_dir and _workspace_root and not os.path.isabs(work_dir):
    work_dir = os.path.join(_workspace_root, work_dir)
# joins, never validates
result = _execute_command(command=command, cwd=work_dir, timeout=120)
# workspace not even passed

Note: execute_command rejects shell=True and runs shlex.split(command) via subprocess.run (no shell), so shell metacharacters (&&, >, pipes) do not work - but any binary still runs with attacker-chosen argv from the escaped cwd, which is sufficient to read/write outside the workspace.

The workspace is an intended boundary (pre-empts "by design")

The module asserts this control itself: read_file.py "Security check - ensure path is within workspace"; write_file.py "default workspace is cwd so relative paths cannot escape"; is_path_within_directory docstring "(prevents path traversal)"; execute_command workspace param "for security validation". The bug is that the asserted control is unsound (abspath vs realpath) and not applied to list_files/execute_command cwd.

Proof of Concept

Self-contained, local temp fixtures only; no network, no untrusted commands. Real praisonai.code agent tools were called.

workspace = /tmp/.../workspace      outside = /tmp/.../outside
[1] baseline plain ../ read           -> BLOCKED: "Path '../outside/secret.txt' is outside the workspace"
[2] symlink read  (in-WS link)        -> SUCCESS: returned "SECRET_OUTSIDE_WORKSPACE"
[3] symlink write (in-WS link)        -> SUCCESS: outside file now contains "OVERWRITTEN_VIA_SYMLINK"
[4] code_list_files("../outside")     -> SUCCESS: "Contents of ../outside:  📄 secret.txt"
[5] code_execute_command(cwd="../outside","pwd") -> SUCCESS: stdout "/tmp/.../outside"
[6] code_execute_command(cwd="../outside", python3 -c open('planted.txt','w')...)
                                      -> SUCCESS: new file created OUTSIDE workspace, "PWNED_OUTSIDE_WORKSPACE"

Steps 2-6 each cross the configured workspace boundary; step 1 shows the plain-../ guard that the symlink and unscoped vectors bypass.

Impact

  • Confidentiality: read files outside the workspace (in-workspace symlink; or list/enumerate outside dirs via list_files).
  • Integrity: overwrite outside files via symlink; create/modify files outside the workspace via execute_command running in an escaped cwd.
  • Execution boundary: run arbitrary available binaries (argv-controlled) from a directory outside the workspace.

Bounded by the process user's permissions. In a code-agent or server-exposed agent processing untrusted input, this exposes secrets / project-adjacent / host files and breaks the project-boundary integrity guarantee the workspace setting advertises.

Suggested Fix

  • Replace is_path_within_directory() with a realpath() / Path.resolve()-based containment check, and compare with os.path.commonpath() rather than startswith.
  • Apply that check consistently to every file path, directory path, backup path, diff/search-replace target, and command working directory, after full canonicalization (resolve the symlink's real target, not the link path).
  • list_files(): reject absolute paths and ../ escapes when workspace is set.
  • execute_command(): validate cwd containment when workspace is set; code_execute_command() should pass _workspace_root to the low-level helper or validate itself.
  • Regression tests: symlink read/write/diff/search-replace to outside targets; list_files("../outside", workspace=…); execute_command(cwd="../outside", workspace=…); absolute outside paths with a workspace set.

Executive ViewAI

Why It Matters

PraisonAI's CODE_TOOLS component contains a vulnerability that allows AI agents to bypass workspace security boundaries and access files or execute commands outside their intended restrictions; publicly available exploit code exists. This puts organizations using PraisonAI agents at risk of unauthorized data access, file modification, and code execution-impact limited only by the user account's operating system permissions.

Business Impact: High
Compensating Controls

Apply vendor patch.

Threat Intelligence Overview

EPSS Score
0.3%
Top 81% exploitable
Prevalence
Low
niche Python AI agent framework, limited enterprise footprint
Threat Intel
1
1 source
Exploit
POC
Public exploit code exists
Data Quality
5 sources
Confidence: Medium

How this decision was reached

The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.

SignalValue
Severity HIGH
CISA KEV No
Public POC Yes
EPSS 0.3%
Patch available Yes
Active threat No
Deciding rule
HIGH severity (CVSS 7.0-8.9)
What every action level means
Emergency Immediate action required. Criteria: CRITICAL + in CISA KEV (actively exploited) without patch, OR CRITICAL + EPSS > 30% without patch, OR CRITICAL + active threat signals without patch.
Act Now Prioritize within 24-48h. Criteria: in KEV with patch available, OR CRITICAL + public POC, OR HIGH + EPSS > 10%, OR CRITICAL + active threat, OR any CRITICAL severity.
This Week Schedule remediation this week. Criteria: HIGH severity (CVSS 7.0-8.9). Patch within normal change window.
This Month Plan within 30 days. Criteria: MEDIUM severity (CVSS 4.0-6.9), lower exploitation probability. Include in regular patch cycle.
Monitor Track and reassess. Criteria: LOW severity (CVSS 0.1-3.9), minimal exploitation risk. No immediate action needed.

SSVC AssessmentENISA

SSVC Decision· derived
Scheduled
Exploitation· derived
Poc
System Exposure· derived
Open
Automatable· derived
No
Human Impact
High

Priority Score

56
Low Medium High Critical
KEV: 0
EPSS: 0
CVSS: +36
PoC: +20
Weaponized: 0
Threat intel: 0
Gov advisory: 0

Attack Technique

Path traversal exploits occur when applications use user-controlled input to construct file system paths without proper validation.

More in Python

View all
CVE-2025-24016 CRITICAL POC
9.9 Feb 10

Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t

CVE-2025-27520 CRITICAL POC
9.8 Apr 04

BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser

CVE-2025-2945 CRITICAL POC
9.9 Apr 03

pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi

CVE-2013-5093 MEDIUM POC
6.8 Sep 27

The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python

CVE-2025-32375 CRITICAL POC
9.8 Apr 09

BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica

CVE-2014-0224 HIGH POC
7.4 Jun 05

OpenSSL before 0.9.8za, 1.0.0 before 1.0.0m, and 1.0.1 before 1.0.1h does not properly restrict processing of ChangeCiph

CVE-2024-21644 HIGH POC
7.5 Jan 08

pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.

CVE-2026-33017 CRITICAL POC
9.3 Mar 17

Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301

CVE-2017-9462 HIGH POC
8.8 Jun 06

In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse

CVE-2026-49869 CRITICAL POC
10.0 Jun 26

Unauthenticated remote code execution affects Kestra OSS (the open-source event-driven orchestration platform) prior to

CVE-2026-39987 CRITICAL POC
9.3 Apr 08

Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/

CVE-2024-21645 MEDIUM POC
5.3 Jan 08

pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy