PRAISONAI · CVE-2026-35615 · AI agents & MCP
FIX → 1.5.113
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.
first public Apr 5, 2026 · 2 sources
Check it with your coding agent
It reads this page and tells you if your code or app 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.
Not affected if fixed-version, no-file-tools-in-use, trusted-paths-only
Who cares ai-agents, praisonai, pypi, python
pip show PraisonAI and confirm the installed version is above 1.5.112.praisonaiagents.tools.file_tools or FileTools to see whether agents expose these file operations.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.
_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
class FileTools:
() -> :
normalized = os.path.normpath(filepath)
absolute = os.path.abspath(normalized)
normalized:
ValueError()
absolute
Are you affected?
Ask from here. InfraStack checks the affected versions against your stack and answers in your inbox.
InfraStack checks the affected versions against your stack and answers in Slack, with the evidence and the fix.
InfraStack checks it against your stack and answers on your report, with the evidence and the fix.
Upgrade to 1.5.113
1.5.113.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')
Prerequisites:
Steps to reproduce: poc.py
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:
# 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(...)
/etc/passwd, /etc/shadow, ~/.ssh/id_rsaread_file, write_file, list_files, get_file_info, copy_file, move_file, delete_file, download_file'..' 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.This page as .md · .json · 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
GitHub Advisory Database, CC-BY 4.0 · NVD data is provided by NIST and is public domain. Posts quoted belong to their authors.