CVE-2026-56839

HIGHPre-NVD 7.37.3
EchelonGraph scoreLOW confidence

This high-severity CVE scores 7.3 under the CNA's CVSS (NVD's own analysis pending). EPSS exploit-prediction score not yet available (the EPSS model rescores nightly; freshly-published CVEs typically appear within 48 hours). GitHub Security Advisory data not yet ingested — confidence will rise once GHSA publishes (typical lag: hours to days for open-source ecosystem CVEs; never for infrastructure-only CVEs).

Triggered by: NVD CVSS baseline
Sources: cna:github_m
7.3EG
EchelonGraph verdictPlan a fixSerious severity, but no confirmed exploitation yet.
  • High severity, but no confirmed exploitation yet
CISA-KEV: Not listedEPSS PROB: CVSS: 7.3Exploit: None knownExposed: 0

No vendor fix yet — apply a workaround or compensating control (WAF / firewall / segmentation) and watch for a patch.

PraisonAI Code agent tools fail open without a workspace boundary

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:

  • Make every low-level file helper compute effective_workspace = workspace or os.getcwd() before resolving paths.
  • 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.
  • Keep allowing absolute paths only when they resolve inside the effective workspace.
  • Add regression tests proving outside absolute paths are rejected before and after set_workspace().
  • 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.

CVSS v3
7.3
EG Score
7.3(low)
EG Risk
37(Track)
EG Risk 37/100SSVC: Track

EG Risk is EchelonGraph's 0–100 priority score: it fuses intrinsic severity with real-world exploitation and automatability so you can rank equal-severity CVEs and fix the most dangerous first. Higher = act sooner. Distinct from the 0–10 EG Score (severity).

How it’s computed
Severity73% × 45%
Exploitation0% × 40%
Automatability30% × 15%
Action: Routine — remediate on your standard cadence.
EPSS PROB
EPSS %ILE
KEV
Not listed

Published

June 18, 2026

Last Modified

June 18, 2026

Vendor Advisories for CVE-2026-56839(1)

These vendors published their own advisory mentioning this CVE — often with vendor-specific remediation steps + affected product lists not in NVD.

Affected Packages

(1 across 1 ecosystem)
PyPI(1)
PackageVulnerable rangeFixed inDependents
praisonai0.0.1 ... 4.6.9 (749 versions)4.6.59

Data Freshness Timeline

(refreshed 3× in last 7d / 3× in last 30d)

Each row is a source pipeline that fetched or updated this CVE on that date, with what changed. For example, "NVD update" means NVD published or revised its analysis for this CVE; "MITRE cvelistV5" means we ingested or refreshed it from the CNA feed. Most recent first.

  1. 2026-07-26 18:44 UTCEG score recompute
  2. 2026-07-23 03:20 UTCEG score recompute
  3. 2026-07-20 21:33 UTCEG score recompute

Frequently asked(4)

What is CVE-2026-56839?
CVE-2026-56839 is a high vulnerability published on June 18, 2026. PraisonAI Code agent tools fail open without a workspace boundary PraisonAI Code agent tools fail open without a workspace boundary Summary PraisonAI Code's agent-compatible CODETOOLS wrappers keep a global workspace root initialized to None. If an application uses CODETOOLS, codereadfile,…
When was CVE-2026-56839 disclosed?
CVE-2026-56839 was first published in the National Vulnerability Database on June 18, 2026. EchelonGraph re-ingests CVE updates from NVD on a 2-hour cycle, so this page reflects the latest published state.
What is the CVSS score of CVE-2026-56839?
CVE-2026-56839 has a CVSS v4.0 base score of 7.3 (CNA self-assessment; NVD's own analysis pending). The EG score is currently aggregating — additional source signals are being incorporated as they become available..
How do I remediate CVE-2026-56839?
Patch to the fixed version published by the affected vendor. Where vendor advisories exist for CVE-2026-56839, EchelonGraph cross-links them in the Vendor Advisories panel below — those typically contain the canonical remediation steps, fixed version numbers, and any vendor-specific mitigations.

Dependency Blast Radius

See which npm, PyPI, Go, and Maven packages are affected by CVE-2026-56839

Explore →

Is Your Infrastructure Affected by CVE-2026-56839?

EchelonGraph automatically scans your cloud infrastructure and maps CVE exposure using blast radius analysis.