CVE-2022-31503
📋 TL;DR
This vulnerability allows attackers to perform absolute path traversal attacks in Orchest versions before 2022.05.0. By exploiting unsafe usage of Flask's send_file function, attackers can access arbitrary files on the server filesystem. This affects all deployments running vulnerable Orchest versions.
💻 Affected Systems
- Orchest
📦 What is this software?
Orchest by Orchest
⚠️ Risk & Real-World Impact
Worst Case
Complete server compromise through reading sensitive files like SSH keys, configuration files, or database credentials, potentially leading to remote code execution.
Likely Case
Unauthorized access to sensitive application files, configuration data, and potentially user data stored on the server filesystem.
If Mitigated
Limited impact with proper file permissions and network segmentation, though file disclosure remains possible.
🎯 Exploit Status
The vulnerability is straightforward to exploit with publicly available information about the unsafe send_file usage.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: v2022.05.0
Vendor Advisory: https://github.com/orchest/orchest/releases/tag/v2022.05.0
Restart Required: Yes
Instructions:
1. Backup your Orchest data and configuration. 2. Update to Orchest v2022.05.0 or later. 3. Restart the Orchest service. 4. Verify the fix by checking the version and testing path traversal attempts.
🔧 Temporary Workarounds
Network Segmentation
allRestrict network access to Orchest instances to trusted networks only
File Permission Hardening
linuxSet strict file permissions on sensitive directories and files
chmod 600 /path/to/sensitive/files
chown root:root /path/to/sensitive/directories
🧯 If You Can't Patch
- Implement strict network access controls to limit exposure
- Deploy web application firewall with path traversal protection rules
🔍 How to Verify
Check if Vulnerable:
Check if Orchest version is earlier than 2022.05.0
Check Version:
Check Orchest web interface or deployment configuration for version information
Verify Fix Applied:
Confirm version is 2022.05.0 or later and test path traversal attempts return appropriate errors
📡 Detection & Monitoring
Log Indicators:
- Unusual file access patterns in application logs
- Multiple failed path traversal attempts
- Access to files outside expected directories
Network Indicators:
- HTTP requests with ../ patterns or absolute paths
- Unusual file download patterns
SIEM Query:
source="orchest" AND (url="*../*" OR url="*/etc/*" OR url="*/root/*")
🔗 References
- https://github.com/github/securitylab/issues/669#issuecomment-1117265726
- https://github.com/orchest/orchest/pull/913
- https://github.com/orchest/orchest/releases/tag/v2022.05.0
- https://github.com/github/securitylab/issues/669#issuecomment-1117265726
- https://github.com/orchest/orchest/pull/913
- https://github.com/orchest/orchest/releases/tag/v2022.05.0