GHSA-693f-pf34-72c5
GHSA-693f-pf34-72c5 is a Path Traversal vulnerability in praisonai. O3 Security confirms whether GHSA-693f-pf34-72c5 is actually reachable in your code before you act, and blocks exploitation at runtime until you patch.
PraisonAI Has Path Traversal in FileTools
Real-World Exposure
praisonaiReal-time download stats are indexed for npm and PyPI packages. This vulnerability affects PyPI packages — download data is not available via public APIs for these ecosystems.
Description
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
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
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(...)
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 filepathBEFORE callingnormpath(), not after _validate_pathusesos.path.normpathandos.path.abspath, which don't resolve symlinks, making it vulnerable to path traversal via symlink if attacker can control the symlink.
Affected Packages
| Ecosystem | Package | Vulnerable range | Fix |
|---|---|---|---|
| 🐍PyPI | praisonai | all versions | 1.5.113 |
Detection & mitigation playbook
Open-source dependencyDetect
Scan your dependency tree (package-lock.json, pnpm-lock.yaml, requirements.txt, go.sum, etc.) for praisonai. O3's reachability analysis confirms whether the vulnerable code path is actually invoked in your application, so you act on real exposure instead of every transitive match.
Fix
Update praisonai to 1.5.113 or later, then make sure no transitive (indirect) dependency still pins the vulnerable range — O3 confirms GHSA-693f-pf34-72c5 is resolved across your whole dependency graph.
Workarounds
If you can't upgrade right away: gate or disable the affected feature, validate untrusted input at the boundary, and avoid passing attacker-controlled data into the vulnerable path. O3's runtime protection blocks exploitation in production as an interim safeguard until the upgrade lands.
How O3 protects you
O3 pinpoints whether GHSA-693f-pf34-72c5 is reachable in your code and exactly where to fix it, then blocks exploitation in production at runtime until the patched version is deployed.
Tailored to GHSA-693f-pf34-72c5. Runtime protection reduces exposure until a permanent patch is applied and verified — it complements patching, it doesn't replace it.
Frequently Asked Questions
Is GHSA-693f-pf34-72c5 in your dependencies?
O3 detects GHSA-693f-pf34-72c5 across PyPI dependencies and uses function-level reachability to confirm whether the vulnerable code path is actually reachable — not just present. No false positives.