---
id: "CVE-2026-35615"
page: "https://infrastack.ai/live/CVE-2026-35615"
kind: "vulnerability"
aliases: ["CVE-2026-35615", "GHSA-693f-pf34-72c5"]
title: "PraisonAI Has Path Traversal in FileTools"
severity: "critical"
cvss: 9.2
epss: 0.00432
exploited: false
status: "open"
category: "ai-tooling"
products: [{"name": "PraisonAI", "fixed": ["1.5.113"], "affected": "<= 1.5.112", "ecosystem": "pypi"}, {"name": "praison praisonai", "fixed": ["1.5.113"], "affected": "< 1.5.113", "ecosystem": "vendor"}, {"via": "cpe", "name": "PraisonAI", "fixed": ["1.5.113"], "affected": "< 1.5.113", "ecosystem": "pypi"}]
ecosystems: ["pypi", "vendor"]
tags: ["ai-agents", "ai-tooling", "cwe-22", "praisonai", "pypi", "python"]
not_affected_if: ["fixed-version", "no-file-tools-in-use", "trusted-paths-only"]
published_at: "2026-04-06T23:09:28+00:00"
first_seen_at: "2026-11-16T15:48:11+00:00"
updated_at: "2026-11-16T16:08:50+00:00"
sources: [{"source": "ghsa", "url": "https://github.com/advisories/GHSA-693f-pf34-72c5", "first_seen_at": "2026-11-16T15:48:11+00:00"}, {"source": "nvd", "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-35615", "first_seen_at": "2026-11-16T16:08:50+00:00"}]
exploit_sources: [{"type": "epss", "score": 0.00432, "url": "https://api.first.org/data/v1/epss?cve=CVE-2026-35615"}]
---

# PraisonAI Has Path Traversal in FileTools

Link for people: https://infrastack.ai/live/CVE-2026-35615 (this .md is for agents)

PraisonAI's FileTools path check runs after the path is normalized, so '..' sequences are already removed and the check never fires. An attacker who can supply a file path to an agent can read or write any file the process can reach, such as /etc/passwd or ~/.ssh/id_rsa.

_Summary, check and fix written by a model from the sources; labelled as such._

## Affected

- pypi:PraisonAI affected <= 1.5.112 fixed 1.5.113
- vendor:praison praisonai affected < 1.5.113 fixed 1.5.113
- pypi:PraisonAI affected < 1.5.113 fixed 1.5.113

## How to check

- Run `pip show PraisonAI` and confirm the installed version is above `1.5.112`.
- Search your code for imports of `praisonaiagents.tools.file_tools` or `FileTools` to see whether agents expose these file operations.

## Fix

- PraisonAI: upgrade to `1.5.113`.

## Timeline

- 2026-11-16T15:48:11+00:00 ghsa https://github.com/advisories/GHSA-693f-pf34-72c5
- 2026-11-16T16:08:50+00:00 nvd https://nvd.nist.gov/vuln/detail/CVE-2026-35615

## Documents

- [advisory] Maintainer's advisory: github.com https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-693f-pf34-72c5
- [advisory] Maintainer's advisory: api.github.com https://api.github.com/repos/MervinPraison/PraisonAI/security-advisories/GHSA-693f-pf34-72c5
- [fix] Release: github.com https://github.com/MervinPraison/PraisonAI/releases/tag/v4.5.113

## From the sources

### 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.

---

_Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai_
