# CVE-2026-56839: PraisonAI path traversal in CODE_TOOLS helpers

Source: https://junglewise.ai/threats/cve-2026-56839-praisonai-path-traversal-in-code-tools-helpers  
Publisher: Junglewise Threat Intelligence, https://junglewise.ai/threats  
Published: 2026-09-14. Updated: 2026-09-26  
License: CC BY 4.0 with a link back

CVE-2026-56839 · Severity: high · CVSS 7.3 · Published 2026-09-14

PraisonAI is a multi-agent AI system that allows agents to read and modify files on a system. Prior to version 4.6.59, code helper functions (read_file, search_replace, apply_diff) failed to properly restrict file access when the workspace was not initialized, allowing an attacker to read and modify arbitrary files outside the intended project directory through prompt injection attacks.

Technologies: [praisonai (PyPI)](https://junglewise.ai/threats/technologies/pypi-praisonai). Vendors: [PyPI](https://junglewise.ai/threats/vendors/pypi).

## Quick answers

**Is CVE-2026-56839 exploited in the wild?** No. Junglewise Threat Intelligence has no report of CVE-2026-56839 being exploited in the wild.

**How severe is CVE-2026-56839?** High severity, with a CVSS score of 7.3, published 14 September 2026.

**Which products and versions are affected?** praisonai (PyPI) ECOSYSTEM:introduced=0,fixed=4.6.59.

**Is there a fix for CVE-2026-56839?** Yes. praisonai (PyPI): upgrade to 4.6.59 or later. Junglewise finds every place you run it, drafts the upgrade and applies it once you approve.

**How is CVE-2026-56839 attacked?** It is attacked over the network, in a software library.

**Am I affected by CVE-2026-56839?** Check whether you run praisonai (PyPI) at an affected version. Junglewise does that check for you around the clock: connect your code, cloud and domains, and it matches new vulnerabilities like this one against what you actually run and tells you when one reaches you.

## How to fix

- praisonai (PyPI): upgrade to 4.6.59 or later

  ```sh
  pip install "praisonai>=4.6.59"
  ```


## Technical details

The vulnerability is a path traversal flaw in the CODE_TOOLS wrappers. The root cause is that _workspace_root is initialized as None and passed to read_file, search_replace, and apply_diff helpers, which only enforce path containment checks when workspace is truthy. This means an application exposing these code tools before calling set_workspace can be exploited via prompt-influenced calls to access files outside the intended project directory. An attacker can read sensitive files or modify critical system files if the application runs with elevated privileges. The vulnerability requires network access to the PraisonAI application and is fixed in version 4.6.59.

## Affected products

- MervinPraison PraisonAI prior to 4.6.59

## Identifiers

- CVE-2026-56839
- GHSA-gcq3-mfvh-3x25
- PYSEC-2026-3512

## Timeline

- 2026-09-14: disclosed
- 2026-06-17: patched: Fixed in version 4.6.59

## References

- [https://github.com/MervinPraison/PraisonAI/commit/b4270173d4123fb1ee8910588f0896668ee21b59](https://github.com/MervinPraison/PraisonAI/commit/b4270173d4123fb1ee8910588f0896668ee21b59)
- [https://github.com/MervinPraison/PraisonAI/releases/tag/v4.6.59](https://github.com/MervinPraison/PraisonAI/releases/tag/v4.6.59)

## Related threats

- [PraisonAI authentication bypass in A2U event streaming](https://junglewise.ai/threats/cve-2026-57146-praisonai-a2u-incomplete-authentication-fix-leaves-current-serve)
- [PraisonAI sandbox escape when Landlock unavailable](https://junglewise.ai/threats/cve-2026-57144-praisonai-sandlocksandbox-falls-back-to-unrestricted-subprocess)
- [PraisonAI recipe policy bypass via YAML-approved tools](https://junglewise.ai/threats/cve-2026-57142-praisonai-recipe-workflow-policy-can-be-bypassed-by-declaring-and)
- [PraisonAI shell command injection in compute-bridged file tools](https://junglewise.ai/threats/cve-2026-57117-praisonai-compute-bridged-file-tools-allow-shell-command)
- [PraisonAI AgentOS authentication bypass in FastAPI deployment](https://junglewise.ai/threats/cve-2026-57116-praisonai-agentos-remains-unauthenticated-after-incomplete-fix)
