Your RSA-2048 keys break in 2030. Find every one of them before attackers do.
🐍
🐍 PyPI
Not in CISA KEV
HIGH severity

GHSA-gcq3-mfvh-3x25

HIGH

GHSA-gcq3-mfvh-3x25 is a high-severity (CVSS 7.3) Path Traversal vulnerability in praisonai. O3 Security confirms whether GHSA-gcq3-mfvh-3x25 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.

PraisonAI Code agent tools fail open without a workspace boundary

Also known asCVE-2026-56839PYSEC-2026-3512
Published
Jun 18, 2026
Updated
Jul 23, 2026
Affected
1 pkg
Patched
1 / 1
Exploits
None indexed
Exploitation data as of Sep 16, 2026 · OSV.dev, NVD, FIRST.org (EPSS)

Exploitation Status

Proof-of-concept exploit code exists

  • CISA’s SSVC triage found public proof-of-concept exploit code for this CVE, though no confirmed active exploitation.
  • A successful exploit gives an attacker total control of the affected component, not partial access.

Exploitation and automatability from CISA’s SSVC triage for GHSA-gcq3-mfvh-3x25.

EPSS Exploitation Probability

via FIRST.org ↗
0.3%probability of exploitation in next 30 days
Lower Risk0.00%
Lower risk than most CVEs23th percentile — riskier than 23% of all scored CVEsHighest risk

EPSS (Exploit Prediction Scoring System) is a daily probability model maintained by FIRST.org. It estimates the likelihood a CVE will be exploited in production environments within the next 30 days, derived from real-world threat intelligence signals.

How urgent is this, really

GHSA-gcq3-mfvh-3x25 plotted by exploitation likelihood (EPSS) against impact (CVSS). The shaded corner — EPSS 50%+ and CVSS 7.0+ — is where this CVE doesn't sit, though severity or exploitability alone can still warrant action.

Where this sits among everything scored

Of 374,847 CVEs with a current EPSS score, this one falls in the < 10% band (highlighted). Real counts from FIRST.org, not a sample — log-scaled since the landscape is heavily right-skewed.

Real-World Exposure

1 pkg affected
🐍praisonai

Real-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.

Description

PraisonAI Code agent tools fail open without a workspace boundary

Summary

PraisonAI Code's agent-compatible CODE_TOOLS wrappers keep a global workspace root initialized to None. If an application uses CODE_TOOLS, code_read_file, code_search_replace, or code_apply_diff before calling set_workspace(), the wrappers pass workspace=None into lower-level helpers that only enforce path containment when a workspace is truthy. Absolute paths outside the intended project workspace are then read and modified.

The official examples correctly call set_workspace() before CODE_TOOLS, and this report does not claim configured workspaces are ineffective. The issue is the fail-open default. PraisonAI's security documentation describes workspace boundaries as the path-traversal protection mechanism, and the already-published Python API arbitrary file write advisory (GHSA-hvhp-v2gc-268q) was fixed by defaulting an unset workspace to os.getcwd(). The adjacent read and edit paths reached through CODE_TOOLS still fail open.

Affected Components

  • Package: praisonai
  • Current upstream main tested: 2f9677abb2ea68eab864ee8b6a828fd0141612e1
  • Latest tested release: v4.6.57
  • Primary files:
    • src/praisonai/praisonai/code/agent_tools.py
    • src/praisonai/praisonai/code/tools/read_file.py
    • src/praisonai/praisonai/code/tools/search_replace.py
    • src/praisonai/praisonai/code/tools/apply_diff.py

Root Cause

agent_tools.py initializes _workspace_root to None and passes it directly to lower-level helpers:

_workspace_root: Optional[str] = None
...
result = _read_file(..., workspace=_workspace_root)
...
result = _search_replace(..., workspace=_workspace_root)

The lower-level helpers only enforce containment if workspace is set:

if workspace:
    if not is_path_within_directory(abs_path, workspace):
        return {"success": False, ...}

The already-hardened write_file() path uses effective_workspace = workspace or os.getcwd(). Current tests assert that write_file(workspace=None) must stay inside the current working directory. The same fail-closed default is missing from read_file, search_replace, apply_diff, and the agent wrappers that call them.

Local-Only Reproduction

Run:

PYTHONPATH=/path/to/PraisonAI/src/praisonai:/path/to/PraisonAI/src/praisonai-agents \
  python poc_code_tools_workspace_bypass.py

Expected vulnerable result:

[poc] HIT: CODE_TOOLS wrappers read and edit outside workspace when workspace is unset

The PoV creates a temporary workspace and a temporary file outside that workspace. With get_workspace() == None, code_read_file() reads the outside file, code_search_replace() modifies it, and code_apply_diff() modifies it again. After set_workspace(workspace), the same outside path is rejected by all three wrappers.

No external services, model providers, or network access are used.

Impact

If an application exposes PraisonAI Code's agent-compatible CODE_TOOLS to an LLM before setting a workspace boundary, prompt-influenced tool calls can read and modify files outside the intended project workspace. The practical attack shape matches the existing PraisonAI prompt-content advisory pattern: untrusted content influences an agent that has been given file-editing tools.

Practical impacts include:

  • reading host secrets or local configuration files accessible to the process user;
  • modifying arbitrary existing files when the attacker can supply or infer matching content for code_search_replace or code_apply_diff;
  • using code_read_file to first learn file content and then code_apply_diff to produce an exact modification;
  • bypassing the advertised workspace-boundary security posture unless the embedding application remembered to call set_workspace() first.

This issue does not claim set_workspace() is ineffective. The control works when configured. The vulnerability is the fail-open default for the advertised agent-tool bundle and adjacent read/edit helpers.

Affected-Version Sweep

The same behavior was reproduced on:

  • current upstream main: 2f9677abb2ea68eab864ee8b6a828fd0141612e1
  • v4.6.57
  • v4.6.56
  • v4.6.10
  • v4.6.9
  • v4.5.128
  • v4.5.126
  • v3.9.26
  • v3.9.24

Suggested Fix

Recommended fix:

  1. Make every low-level file helper compute effective_workspace = workspace or os.getcwd() before resolving paths.
  2. Make code_read_file, code_list_files, code_apply_diff, code_search_replace, and code_execute_command use os.getcwd() as the default workspace when _workspace_root is None.
  3. Keep allowing absolute paths only when they resolve inside the effective workspace.
  4. Add regression tests proving outside absolute paths are rejected before and after set_workspace().
  5. Consider failing closed if CODE_TOOLS is used before a workspace is configured, or log a warning when the default current working directory is used.

Disclosure Route

PraisonAI's official security documentation lists GitHub Security Advisories as the preferred reporting method and asks reports to include reproduction steps, affected versions, impact, and suggested fixes. The repository security policy page currently shows no configured SECURITY.md, but private vulnerability reporting is available.

Affected Packages

1 total 1 fixed
EcosystemPackageVulnerable rangeFix
🐍PyPIpraisonaiall versions4.6.59

Detection & mitigation playbook

Open-source dependency
  1. Detect

    Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for praisonai. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.

  2. Fix

    Update praisonai to 4.6.59 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-gcq3-mfvh-3x25 is resolved across your whole dependency graph.

  3. Workarounds

    If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.

  4. How O3 protects you

    O3 pinpoints whether GHSA-gcq3-mfvh-3x25 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.

Tailored to GHSA-gcq3-mfvh-3x25. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.

Frequently Asked Questions

# PraisonAI Code agent tools fail open without a workspace boundary ## Summary PraisonAI Code's agent-compatible `CODE_TOOLS` wrappers keep a global workspace root initialized to `None`. If an application uses `CODE_TOOLS`, `code_read_file`, `code_search_replace`, or `code_apply_diff` before calling `set_workspace()`, the wrappers pass `workspace=None` into lower-level helpers that only enforce path containment when a workspace is truthy. Absolute paths outside the intended project workspace are then read and modified. The official examples correctly call `set_workspace()` before `CODE_TOOL
O3 Security · Impact-Aware SCA

Is GHSA-gcq3-mfvh-3x25 in your dependencies?

O3 detects GHSA-gcq3-mfvh-3x25 across PyPI dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.

GHSA-gcq3-mfvh-3x25: praisonai (High 7.3) | O3 Security