CVE-2026-35615: PraisonAI has a Path Traversal in FileTools

Published Apr 6, 2026
·
Updated

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: validatepath() 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/filetools.py

Lines: 42-49

python class FileTools: """Tools for file operations including read, write, list, and information.""" @staticmethod def validatepath(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.filetools import FileTools

print(FileTools.validatepath('/tmp/../etc/passwd')) Returns: /etc/passwd

print(FileTools.readfile('/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/idrsa - Write arbitrary files if combined with write operations - Affect file operations readfile, writefile, listfiles, getfileinfo, copyfile, movefile, deletefile, downloadfile

Additional Notes: - Fix: Check for '..' in filepath BEFORE calling normpath(), not after - validatepath 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.

Other sources

PraisonAI is a multi-agent teams system. Prior to 1.5.113, validatepath() 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.

MITRE

Affected Software

2 affected componentsFixes available
pip/PraisonAI<=1.5.112
1.5.113
Praison PraisonAI<1.5.113

Event History

Apr 6, 2026
Advisory Published
via GitHub·11:09 PM
Data Sourced
via GitHub·11:09 PM
DescriptionWeaknessAffected Software
Apr 7, 2026
CVE Published
via MITRE·04:46 PM
Data Sourced
via MITRE·04:46 PM
DescriptionWeakness
Data Sourced
via NVD·05:16 PM
DescriptionSeverityWeakness
Data Sourced
via NVD·05:16 PM
Affected Software

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203