Severity by source
AV:N/AC:H/PR:N/UI:R/S:U/C:H/I:H/A:L
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.
Primary rating from Vendor (https://github.com/MervinPraison/PraisonAI).
CVSS VectorVendor: https://github.com/MervinPraison/PraisonAI
Lifecycle Timeline
3DescriptionCVE.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:
- The containment helper uses
os.path.abspath(), notrealpath()/Path.resolve(). A symlink located inside the workspace whose target is outside has anabspath()that is still inside the workspace, so it passes the check whileopen()follows the link. This bypasses read, write, apply_diff, and search_replace (CWE-59). list_files()resolvespathagainst the workspace but never calls the containment helper at all -../and absolute paths escape directly (CWE-22).execute_command()takes aworkspaceargument documented "for security validation" but performs nocwdcontainment check;code_execute_command()resolves a relativecwdagainst the workspace and also never validates it (and never even passesworkspaceto the low-level helper). A relativecwd="../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)
# 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)
# 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)
# 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# 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 passedNote: 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_commandrunning 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 arealpath()/Path.resolve()-based containment check, and compare withos.path.commonpath()rather thanstartswith. - 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 whenworkspaceis set.execute_command(): validatecwdcontainment whenworkspaceis set;code_execute_command()should pass_workspace_rootto 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.
AnalysisAI
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. …
Unlock full vulnerability intelligence
- Risk assessment & exploitation conditions
- Attack chain visualization
- Remediation with exact patch versions
- Threat intelligence from 22 sources
- Personal watchlist & email alerts
Free forever · No credit card required
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata
Vulnerability AssessmentAI
| Exploitation | 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). … Additional conditions and limiting factors are described in the full assessment. |
| Risk Assessment | 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. … Full risk analysis with EPSS, KEV, and SSVC signal comparison available after sign-in. |
| Exploit Scenario | Full exploit scenario with step-by-step reproduction available after sign-in. |
| Remediation | 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. … Detailed patch versions, workarounds, and compensating controls in full report. |
Recommended ActionAI
Within 24 hours, identify all systems running PraisonAI and praisonai.code components and determine which agents interact with sensitive filesystems or execute commands in production. …
Sign in for detailed remediation steps and compensating controls.
Threat intelligence, references, and detailed analysis are available after sign-in.
Wazuh SIEM platform versions 4.4.0 through 4.9.0 contain an unsafe deserialization vulnerability in the DistributedAPI t
BentoML version 1.4.2 and earlier contains an unauthenticated remote code execution vulnerability through insecure deser
pgAdmin 4 contains critical remote code execution vulnerabilities in the Query Tool download and Cloud Deployment endpoi
The renderLocalView function in render/views.py in graphite-web in Graphite 0.9.5 through 0.9.10 uses the pickle Python
BentoML is a Python library for building online serving systems optimized for AI apps and model inference. Rated critica
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
pyLoad download manager version prior to 0.5.0b3.dev77 exposes the Flask SECRET_KEY through an unauthenticated endpoint.
Langflow (a visual LLM pipeline builder) contains a critical unauthenticated code execution vulnerability (CVE-2026-3301
In Mercurial before 4.1.3, "hg serve --stdio" allows remote authenticated users to launch the Python debugger, and conse
Unauthenticated remote code execution in Marimo ≤0.20.4 allows attackers to execute arbitrary system commands via the `/
pyLoad is the free and open-source Download Manager written in pure Python. Rated medium severity (CVSS 5.3), this vulne
Cross-user flow execution in Langflow (< 1.9.1) lets any authenticated API-key holder run another user's flow by passing
Same weakness CWE-22 – Path Traversal
View allSame technique Path Traversal
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-65512
GHSA-ch89-h4r2-c8f8