{"id":"CVE-2026-35615","aliases":["CVE-2026-35615","GHSA-693f-pf34-72c5","PYSEC-2026-464"],"related":[],"kind":"vulnerability","state":"published","title":"PraisonAI has a Path Traversal in FileTools","summary":"PraisonAI is a multi-agent teams system. Prior to 1.5.113, _validate_path() calls os.path.normpath() first, which collapses .. sequences, then checks for '..' in normalized. Since .. is already collapsed, the check always passes. This makes the check completely useless and allows trivial path traversal to any file on the system. This vulnerability is fixed in 1.5.113.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"PraisonAI is a multi-agent teams system. Prior to 1.5.113, _validate_path() calls os.path.normpath() first, which collapses .. sequences, then checks for '..' in normalized. Since .. is already collapsed, the check always passes. This makes the check completely useless and allows trivial path traversal to any file on the system. This vulnerability is fixed in 1.5.113.","source":"cvelist"},{"lang":"en","text":"### 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.","format":"markdown","source":"ghsa"},{"lang":"es","text":"PraisonAI es un sistema de equipos multiagente. Antes de la 1.5.113, _validate_path() llama primero a os.path.normpath(), que colapsa las secuencias ’..’, y luego verifica la presencia de ’..’ en la ruta normalizada. Dado que ’..’ ya está colapsado, la verificación siempre se aprueba. Esto hace que la verificación sea completamente inútil y permite un salto de ruta trivial a cualquier archivo del sistema. Esta vulnerabilidad está corregida en la versión 1.5.113.","source":"nvd"}],"published":"2026-04-06T23:09:28.000Z","modified":"2026-11-16T16:00:04.774Z","severity":{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":9.2,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub_M","scheme":"CVSS:4.0","vector":"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","score":9.2,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:4.0","vector":"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","rating":"CRITICAL"},{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N","score":7.5,"rating":"HIGH"},{"scorer":"PyPA Advisory Database","scheme":"CVSS:4.0","vector":"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"}],"cwes":["CWE-22"],"affected":[{"ranges":[{"version":"< 4.5.113","status":"affected"}],"vendor":"MervinPraison","product":"PraisonAI","source":"cvelist"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.5.113"}],"ecosystem":"PyPI","package":"praisonai","purl":"pkg:pypi/praisonai","source":"ghsa"},{"ranges":[{"status":"affected","fixed":"1.5.113"}],"vendor":"praison","product":"praisonai","cpe":"cpe:2.3:a:praison:praisonai:*:*:*:*:*:*:*:*","source":"nvd"},{"ranges":[{"type":"ecosystem","introduced":"0","status":"affected","fixed":"1.5.113"}],"ecosystem":"PyPI","package":"praisonai","purl":"pkg:pypi/praisonai","source":"pysec"}],"references":[{"url":"https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-693f-pf34-72c5","tags":["exploit","vendor-advisory","web","x-refsource-confirm"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://github.com/MervinPraison/PraisonAI/releases/tag/v4.5.113","tags":["release-notes","web","x-refsource-misc"],"sources":["cvelist","ghsa","nvd","pysec"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2026-35615","tags":["advisory"],"sources":["ghsa","pysec"]},{"url":"https://github.com/MervinPraison/PraisonAI","tags":["package"],"sources":["ghsa","pysec"]},{"url":"https://github.com/pypa/advisory-database/tree/main/vulns/praisonai/PYSEC-2026-464.yaml","tags":["web"],"sources":["ghsa"]},{"url":"https://pypi.org/project/praisonai","tags":["package","web"],"sources":["ghsa","pysec"]},{"url":"https://github.com/advisories/GHSA-693f-pf34-72c5","tags":["advisory"],"sources":["pysec"]}],"credits":[],"assigner":"GitHub_M","ssvc":{"scorer":"CISA-ADP","exploitation":"poc","automatable":"yes","technicalImpact":"partial","date":"2026-04-09T15:08:17.336Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-35615","url":"https://www.cve.org/CVERecord?id=CVE-2026-35615","licence":"CVE Terms of Use","modified":"2026-04-09T16:18:10.919Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-693f-pf34-72c5","url":"https://github.com/advisories/GHSA-693f-pf34-72c5","licence":"CC-BY-4.0","modified":"2026-11-16T16:00:04.774Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-35615","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-35615","licence":"Public domain","modified":"2026-10-26T21:10:00.170Z"},{"source":"pysec","name":"PyPA Advisory Database","id":"PYSEC-2026-464","url":"https://osv.dev/vulnerability/PYSEC-2026-464","licence":"CC-BY-4.0","modified":"2026-07-13T16:15:30.373Z"}],"updatedAt":"2026-11-25T22:59:18.137Z","epss":{"score":0.00442,"percentile":0.40155,"date":"2026-12-01T12:00:22.000Z"}}