{"id":"CVE-2026-35615","kind":"vulnerability","aliases":["CVE-2026-35615","GHSA-693f-pf34-72c5"],"related":[],"title":"PraisonAI Has Path Traversal in FileTools","description":"### 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.","summary":"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.","severity":"critical","cvss":9.2,"epss":0.00432,"exploited":false,"exploited_at":null,"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"],"how_to_check":"- Run `pip show PraisonAI` and confirm the installed version is above `1.5.112`.\n- 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`.","status":"open","published_at":"2026-04-06T23:09:28+00:00","first_seen_at":"2026-11-16T15:48:11+00:00","triaged_at":"2026-11-16T15:50:22+00:00","updated_at":"2026-11-16T16:08:50+00:00","category":"ai-tooling","confidence":0.8,"triage":{"at":"2026-11-16T15:50:22Z","model":"claude-haiku-5-5","output":{"fix":"- PraisonAI: upgrade to `1.5.113`.","reach":"network","title":"PraisonAI: file tools let a caller read and write any system file","impact":"high","summary":"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.","audience":"developers","category":"ai-tooling","nicknames":[],"who_cares":["python","pypi","ai-agents","praisonai"],"confidence":0.8,"fix_status":"available","needs_auth":"no","worst_case":"Attacker reads or writes arbitrary files, including secrets and keys.","analyst_note":"","how_to_check":"- Run `pip show PraisonAI` and confirm the installed version is above `1.5.112`.\n- Search your code for imports of `praisonaiagents.tools.file_tools` or `FileTools` to see whether agents expose these file operations.","plain_action":"","product_name":"","needs_analyst":false,"not_affected_if":["no-file-tools-in-use","trusted-paths-only","fixed-version"],"who_is_affected":"Teams whose agents use PraisonAI's FileTools (read_file, write_file, list_files, copy_file, move_file, delete_file, download_file) and let untrusted input, such as a user prompt or a model-chosen path, reach the file path argument. Exposure is through the agent's file operations; a service that never uses FileTools is not affected. The advisory also notes symlinks are not resolved, so a symlink the attacker controls can also reach outside the intended directory.","user_interaction":"no","product_ecosystem":"","needs_special_setup":"yes","severity_if_unknown":"critical"},"cost_usd":0.00088,"input_tokens":5650,"output_tokens":629,"severity_before":"critical"},"analyst_status":null,"analyst_note":null,"search":"'-2026':8A,16A '-22':29B,240C '-35615':9A,17A '-49':160C '/.ssh/id_rsa':79B,340C '/av':226C '/etc/passwd':77B,281C,289C,338C '/etc/shadow':339C '/tmp/../etc/passwd':279C,285C '4.0':225C '42':159C '693f':12A '72c5':14A '9.2':223C 'abil':257C 'absolut':187C,218C,302C 'access':322C 'addit':369C 'affect':349C 'agent':24B,64B 'ai':23B,26B 'ai-ag':22B 'ai-tool':25B 'allow':107C 'alreadi':47B,96C,149C 'also':121C 'alway':153C,311C 'arbitrari':342C 'attack':55B,401C 'attempt':194C,206C 'bug':89C 'bypass':317C 'call':136C,264C,377C 'catch':204C 'caus':130C 'check':37B,51B,91C,103C,143C,152C,190C,198C,308C,372C 'class':162C 'code':296C 'collaps':97C,140C,150C,300C,310C 'combin':345C 'complet':104C,316C 'concept':254C 'content':287C 'control':403C 'copi':361C 'could':128C 'critic':87C,220C 'current':294C 'cve':7A,15A 'cvss':221C,224C 'cwe':28B,238C,239C 'def':175C 'delet':365C 'detail':133C 'detect':215C 'directori':249C,334C 'download':367C 'execut':80C 'f':212C 'fals':312C 'file':60B,70B,113C,156C,166C,261C,265C,284C,325C,337C,343C,350C,353C,355C,357C,359C,362C,364C,366C,368C 'filepath':178C,186C,216C,299C,375C 'filetool':6A,35B,163C,276C 'filetools._validate_path':278C 'filetools.read':283C 'fire':53B 'first':138C 'fix':371C 'function':120C 'get':358C 'ghsa':11A 'ghsa-693f-pf34-72c5':10A 'h/si':235C 'h/vi':232C 'impact':315C 'import':275C 'improp':241C 'includ':168C 'info':360C 'inform':173C 'input':201C 'l/at':228C 'limit':242C 'line':158C 'list':171C,356C 'logic':88C 'make':101C,392C 'move':363C 'n':237C 'n/ac':227C 'n/pr':229C 'n/sa':236C 'n/sc':234C 'n/ui':230C 'n/va':233C 'n/vc':231C 'never':52B 'normal':43B,146C,181C,184C,189C,196C,209C,297C,304C,307C 'normpath':94C,378C 'note':370C 'oper':167C,266C,348C,351C 'origin':200C 'os.path.abspath':188C,303C,386C 'os.path.normpath':137C,185C,298C,384C 'pass':154C 'path':3A,36B,41B,61B,83C,109C,118C,131C,135C,177C,183C,192C,213C,250C,262C,319C,330C,382C,396C 'pathnam':245C 'pf34':13A 'poc':255C 'poc.py':270C 'potenti':129C 'praison':19A 'praisonai':1A,18A,20A,21A,30B,33B 'praisonaiagents.tools.file':273C 'prerequisit':256C 'print':277C,282C 'process':72B 'proof':252C 'protect':321C 'pypi':31B 'python':32B,161C,271C,293C 'rais':210C,313C 'reach':74B 'read':66B,169C,335C,352C 'remov':48B 'reproduc':269C 'resolv':124C,390C 'restrict':248C 'return':217C,280C,286C 'run':38B 'sensit':336C 'sequenc':45B,99C,141C 'sever':219C 'sinc':147C 'specifi':259C 'src/praisonai-agents/praisonaiagents/tools/file_tools.py':157C 'start':333C 'staticmethod':174C 'step':267C 'str':179C,180C 'summari':81C 'suppli':58B 'symlink':126C,391C,399C,405C 'system':116C,328C 'tool':27B,164C,274C 'travers':4A,110C,132C,193C,205C,214C,251C,320C,397C 'trivial':108C 'use':383C 'useless':105C 'v3.1':222C 'valid':84C,119C,134C,176C,381C 'valueerror':211C,314C 'via':398C 'vulner':155C,295C,394C 'wich':127C 'work':292C 'write':68B,170C,341C,347C,354C","nicknames":[],"mitigations":[],"who_affected":"Teams whose agents use PraisonAI's FileTools (read_file, write_file, list_files, copy_file, move_file, delete_file, download_file) and let untrusted input, such as a user prompt or a model-chosen path, reach the file path argument. Exposure is through the agent's file operations; a service that never uses FileTools is not affected. The advisory also notes symlinks are not resolved, so a symlink the attacker controls can also reach outside the intended directory.","tier":"B","verified":{},"analyst_revisit_at":null,"fix_status":"available","audience":"developers","plain_action":null,"pkeys":["praisonai","praisonpraisonai"],"ptokens":["praison","praisonai"],"labels":["aiagents","aitooling","critical","cwe22","praisonai","pypi","python","vendor"],"campaign_type":null,"search_a":"'-2026':8A,16A '-35615':9A,17A '693f':12A '72c5':14A 'cve':7A,15A 'filetool':6A 'ghsa':11A 'ghsa-693f-pf34-72c5':10A 'path':3A 'pf34':13A 'praison':19A 'praisonai':1A,18A,20A,21A 'travers':4A","search_b":"'-22':29B '/.ssh/id_rsa':79B '/etc/passwd':77B 'agent':24B,64B 'ai':23B,26B 'ai-ag':22B 'ai-tool':25B 'alreadi':47B 'attack':55B 'check':37B,51B 'cwe':28B 'file':60B,70B 'filetool':35B 'fire':53B 'never':52B 'normal':43B 'path':36B,41B,61B 'praisonai':30B,33B 'process':72B 'pypi':31B 'python':32B 'reach':74B 'read':66B 'remov':48B 'run':38B 'sequenc':45B 'suppli':58B 'tool':27B 'write':68B","search_c":"'-22':240C '-49':160C '/.ssh/id_rsa':340C '/av':226C '/etc/passwd':281C,289C,338C '/etc/shadow':339C '/tmp/../etc/passwd':279C,285C '4.0':225C '42':159C '9.2':223C 'abil':257C 'absolut':187C,218C,302C 'access':322C 'addit':369C 'affect':349C 'allow':107C 'alreadi':96C,149C 'also':121C 'alway':153C,311C 'arbitrari':342C 'attack':401C 'attempt':194C,206C 'bug':89C 'bypass':317C 'call':136C,264C,377C 'catch':204C 'caus':130C 'check':91C,103C,143C,152C,190C,198C,308C,372C 'class':162C 'code':296C 'collaps':97C,140C,150C,300C,310C 'combin':345C 'complet':104C,316C 'concept':254C 'content':287C 'control':403C 'copi':361C 'could':128C 'critic':87C,220C 'current':294C 'cvss':221C,224C 'cwe':238C,239C 'def':175C 'delet':365C 'detail':133C 'detect':215C 'directori':249C,334C 'download':367C 'execut':80C 'f':212C 'fals':312C 'file':113C,156C,166C,261C,265C,284C,325C,337C,343C,350C,353C,355C,357C,359C,362C,364C,366C,368C 'filepath':178C,186C,216C,299C,375C 'filetool':163C,276C 'filetools._validate_path':278C 'filetools.read':283C 'first':138C 'fix':371C 'function':120C 'get':358C 'h/si':235C 'h/vi':232C 'impact':315C 'import':275C 'improp':241C 'includ':168C 'info':360C 'inform':173C 'input':201C 'l/at':228C 'limit':242C 'line':158C 'list':171C,356C 'logic':88C 'make':101C,392C 'move':363C 'n':237C 'n/ac':227C 'n/pr':229C 'n/sa':236C 'n/sc':234C 'n/ui':230C 'n/va':233C 'n/vc':231C 'normal':146C,181C,184C,189C,196C,209C,297C,304C,307C 'normpath':94C,378C 'note':370C 'oper':167C,266C,348C,351C 'origin':200C 'os.path.abspath':188C,303C,386C 'os.path.normpath':137C,185C,298C,384C 'pass':154C 'path':83C,109C,118C,131C,135C,177C,183C,192C,213C,250C,262C,319C,330C,382C,396C 'pathnam':245C 'poc':255C 'poc.py':270C 'potenti':129C 'praisonaiagents.tools.file':273C 'prerequisit':256C 'print':277C,282C 'proof':252C 'protect':321C 'python':161C,271C,293C 'rais':210C,313C 'read':169C,335C,352C 'reproduc':269C 'resolv':124C,390C 'restrict':248C 'return':217C,280C,286C 'sensit':336C 'sequenc':99C,141C 'sever':219C 'sinc':147C 'specifi':259C 'src/praisonai-agents/praisonaiagents/tools/file_tools.py':157C 'start':333C 'staticmethod':174C 'step':267C 'str':179C,180C 'summari':81C 'symlink':126C,391C,399C,405C 'system':116C,328C 'tool':164C,274C 'travers':110C,132C,193C,205C,214C,251C,320C,397C 'trivial':108C 'use':383C 'useless':105C 'v3.1':222C 'valid':84C,119C,134C,176C,381C 'valueerror':211C,314C 'via':398C 'vulner':155C,295C,394C 'wich':127C 'work':292C 'write':170C,341C,347C,354C","cause_entry":null,"cause_path":null,"disclosures_checked_at":null,"first_public_at":"2026-04-05T05:01:37+00:00","kev":null,"cvss_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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X","cvss_by":"security-advisories@github.com","poc_count":0,"sources":[{"source":"ghsa","external_id":"GHSA-693f-pf34-72c5","url":"https://github.com/advisories/GHSA-693f-pf34-72c5","severity":"critical","published_at":"2026-04-06T23:09:28+00:00","modified_at":"2026-11-16T15:44:46+00:00","first_seen_at":"2026-11-16T15:48:11+00:00","fetched_at":"2026-11-16T15:56:53+00:00","note":null},{"source":"nvd","external_id":"CVE-2026-35615","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-35615","severity":null,"published_at":"2026-04-07T17:16:35+00:00","modified_at":"2026-10-26T21:10:00+00:00","first_seen_at":"2026-11-16T16:08:50+00:00","fetched_at":"2026-11-16T16:08:50+00:00","note":null}],"documents":[{"id":170783,"url":"https://github.com/MervinPraison/PraisonAI/security/advisories/GHSA-693f-pf34-72c5","title":"Maintainer's advisory: github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":"2026-04-05T05:01:37+00:00","relation":"advisory","confidence":null,"note":"Maintainer's advisory: github.com"},{"id":170784,"url":"https://github.com/MervinPraison/PraisonAI/releases/tag/v4.5.113","title":"Release: github.com","kind":"release","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"fix","confidence":null,"note":"Release: github.com"},{"id":170782,"url":"https://api.github.com/repos/MervinPraison/PraisonAI/security-advisories/GHSA-693f-pf34-72c5","title":"Maintainer's advisory: api.github.com","kind":"vendor","source":"ghsa","publisher":"vendor","text":null,"published_at":null,"relation":"advisory","confidence":null,"note":"Maintainer's advisory: api.github.com"}],"disclosures":[],"exploit_sources":[{"type":"epss","score":0.00432,"url":"https://api.first.org/data/v1/epss?cve=CVE-2026-35615"}],"notice":"Free to read, with fair use of about 60 pages a minute. For higher limits or API access: sales@infrastack.ai"}