CVE-2026-35615: PraisonAI Path Traversal Vulnerability

CRITICAL
Advisory Identifier: GHSA-693f-pf34-72c5
CWE-22
Published
Advisory Summary

CVE-2026-35615 is a CRITICAL path traversal vulnerability (CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')) affecting PraisonAI libraries in the PyPI ecosystem. The issue involves praisonai has path traversal in filetools. Remediation is available by upgrading affected packages to version 1.5.113.

CVE-2026-35615 at a Glance

CVE Identifier CVE-2026-35615
GHSA Identifier GHSA-693f-pf34-72c5
Severity CRITICAL
CVSS v3.1 Base Score N/A
CWE Classification CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')
Affected Product PraisonAI
Package Ecosystem PyPI
Published Date
Last Updated

How to Fix CVE-2026-35615

To remediate this vulnerability, upgrade all affected PraisonAI dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

PraisonAI fixed: 1.5.113
pip install PraisonAI>=1.5.113
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

pip show PraisonAI

How to Check if You Are Affected

To determine whether your Python environment is affected by CVE-2026-35615, inspect your installed packages using pip:

pip show PraisonAI

Analyze the terminal output to locate any version of PraisonAI in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.5.113), your application is affected.

Note: The pip show PraisonAI command checks currently installed packages in your active Python environment.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal'), where the product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory. In PraisonAI, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

### Executive Summary: The path validation has a critical logic bug: it checks for `..` AFTER `normpath()` has already collapsed all `..` sequences. This makes the check completely useless and allows trivial path traversal to any file on the system. The path validation function also does not resolve the symlink wich could potentially cause path traversal. ### Details: `_validate_path()` calls `os.path.normpath()` first, which collapses `..` sequences, then checks for `'..'` in normalized. Since `..` is already collapsed, the check always passes. **Vulnerable File:** `src/praisonai-agents/praisonaiagents/tools/file_tools.py` **Lines:** 42-49 ```python class FileTools: """Tools for file operations including read, write, list, and information.""" @staticmethod def _validate_path(filepath: str) -> str: # Normalize the path normalized = os.path.normpath(filepath) absolute = os.path.abspath(normalized) # Check for path traversal attempts (.. after normalization) # We check the original input for '..' to catch traversal attempts if '..' in normalized: raise ValueError(f"Path traversal detected: {filepath}") return absolute ``` **Severity:** CRITICAL **CVSS v3.1:** 9.2 (CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N **CWE:** CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') ### Proof of concept (PoC) **Prerequisites:** - Ability to specify a file path can call file operations **Steps to reproduce:** poc.py ```python from praisonaiagents.tools.file_tools import FileTools print(FileTools._validate_path('/tmp/../etc/passwd')) # Returns: /etc/passwd print(FileTools.read_file('/tmp/../etc/passwd')) # Returns: content of /etc/passwd ``` **Why this works:** ```python # Current vulnerable code: normalized = os.path.normpath(filepath) # Collapses .. HERE absolute = os.path.abspath(normalized) if '..' in normalized: # Check AFTER collapse - ALWAYS FALSE! raise ValueError(...) ``` ### Impact: - **Complete bypass** of path traversal protection - Access to ANY file on the system with path from any starting directory - Read sensitive files: `/etc/passwd`, `/etc/shadow`, `~/.ssh/id_rsa` - Write arbitrary files if combined with write operations - Affect file operations `read_file`, `write_file`, `list_files`, `get_file_info`, `copy_file`, `move_file`, `delete_file`, `download_file` ### Additional Notes: - **Fix:** Check for `'..' in filepath` BEFORE calling `normpath()`, not after - `_validate_path` uses `os.path.normpath` and `os.path.abspath`, which don't resolve symlinks, making it vulnerable to path traversal via symlink if attacker can control the symlink.

CVE-2026-35615 Affected PraisonAI Versions

1 component(s)
Fixed Versions:
1.5.113
Product / Package Ecosystem Affected Versions Fixed Version
PraisonAI
PyPI
< 1.5.113
1.5.113

References

Frequently Asked Questions

What is CVE-2026-35615?
CVE-2026-35615 is a security vulnerability in PraisonAI involving PraisonAI Has Path Traversal in FileTools under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal').
Which PraisonAI versions are affected?
Affected versions include releases prior to 1.5.113 across affected packages: PraisonAI.
What version fixes CVE-2026-35615?
Upgrading to 1.5.113 (or the latest patched release for your respective branch) resolves the vulnerability.
Is PraisonAI affected?
Yes, PraisonAI is affected in releases prior to 1.5.113. Upgrade your dependency to 1.5.113 or later.
What CWE is associated with CVE-2026-35615?
CVE-2026-35615 is classified under CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal') (The product uses external input to construct a pathname that is intended to identify a file or directory that is located underneath a restricted parent directory, but the product does not properly neutralize special elements within the pathname that can cause the pathname to resolve to a location that is outside of the restricted directory.).
How can I check PyPI dependencies for CVE-2026-35615?
Run the dependency tree command: 'pip show PraisonAI'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-693f-pf34-72c5",
  "modified" : "2026-04-07T22:10:17Z",
  "published" : "2026-04-06T23:09:28Z",
  "aliases" : [ "CVE-2026-35615" ],
  "summary" : "PraisonAI Has Path Traversal in FileTools",
  "details" : "### Executive Summary:\nThe path validation has a critical logic bug: it checks for `..` AFTER `normpath()` has already collapsed all `..` sequences. This makes the check completely useless and allows trivial path traversal to any file on the system.\nThe path validation function also does not resolve the symlink wich could potentially cause path traversal.\n\n### Details:\n`_validate_path()` calls `os.path.normpath()` first, which collapses `..` sequences, then checks for `'..'` in normalized. Since `..` is already collapsed, the check always passes.\n\n**Vulnerable File:**\n`src/praisonai-agents/praisonaiagents/tools/file_tools.py`\n\n**Lines:**\n42-49\n\n```python\nclass FileTools:\n    \"\"\"Tools for file operations including read, write, list, and information.\"\"\"\n    \n    @staticmethod\n    def _validate_path(filepath: str) -> str:\n        # Normalize the path\n        normalized = os.path.normpath(filepath)\n        absolute = os.path.abspath(normalized)\n        \n        # Check for path traversal attempts (.. after normalization)\n        # We check the original input for '..' to catch traversal attempts\n        if '..' in normalized:\n            raise ValueError(f\"Path traversal detected: {filepath}\")\n        \n        return absolute\n```\n\n**Severity:** CRITICAL\n\n**CVSS v3.1:** 9.2 (CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N\n\n**CWE:** CWE-22: Improper Limitation of a Pathname to a Restricted Directory ('Path Traversal')\n\n### Proof of concept (PoC)\n\n**Prerequisites:**\n- Ability to specify a file path can call file operations\n\n**Steps to reproduce:**\npoc.py\n```python\nfrom praisonaiagents.tools.file_tools import FileTools\n\nprint(FileTools._validate_path('/tmp/../etc/passwd'))\n# Returns: /etc/passwd\n\nprint(FileTools.read_file('/tmp/../etc/passwd'))\n# Returns: content of /etc/passwd\n```\n\n**Why this works:**\n```python\n# Current vulnerable code:\nnormalized = os.path.normpath(filepath)  # Collapses .. HERE\nabsolute = os.path.abspath(normalized)\nif '..' in normalized:  # Check AFTER collapse - ALWAYS FALSE!\n    raise ValueError(...)\n```\n\n### Impact:\n- **Complete bypass** of path traversal protection\n- Access to ANY file on the system with path from any starting directory\n- Read sensitive files: `/etc/passwd`, `/etc/shadow`, `~/.ssh/id_rsa`\n- Write arbitrary files if combined with write operations\n- Affect file operations `read_file`, `write_file`, `list_files`, `get_file_info`, `copy_file`, `move_file`, `delete_file`, `download_file`\n\n\n### Additional Notes:\n- **Fix:** Check for `'..' in filepath` BEFORE calling `normpath()`, not after\n- `_validate_path` uses `os.path.normpath` and `os.path.abspath`, which don't resolve symlinks, making it vulnerable to path traversal via symlink if attacker can control the symlink.",
  "severity" : [ {
    "type" : "CVSS_V4",
    "score" : "CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:N/VA:N/SC:H/SI:N/SA:N"
  } ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "PyPI",
      "name" : "PraisonAI"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.5.113"
      } ]
    } ],
    "database_specific" : {
      "last_known_affected_version_range" : "<= 1.5.112"
    }
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-693f-pf34-72c5"
  }, {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2026-35615"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/MervinPraison/PraisonAI"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/MervinPraison/PraisonAI/releases/tag/v4.5.113"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-22" ],
    "severity" : "CRITICAL",
    "github_reviewed" : true,
    "github_reviewed_at" : "2026-04-06T23:09:28Z",
    "nvd_published_at" : "2026-04-07T17:16:35Z"
  }
}