CVE-2022-31519
📋 TL;DR
This vulnerability allows attackers to perform absolute path traversal attacks in the Lukasavicus/WindMill repository up to version 1.0. By exploiting unsafe usage of Flask's send_file function, attackers can read arbitrary files from the server filesystem. Anyone running WindMill versions through 1.0 is affected.
💻 Affected Systems
- Lukasavicus/WindMill
📦 What is this software?
Windmill by Windmill Project
⚠️ Risk & Real-World Impact
Worst Case
Complete server compromise through reading sensitive files like SSH keys, configuration files, or database credentials, potentially leading to full system takeover.
Likely Case
Unauthorized access to sensitive server files containing configuration data, credentials, or user information.
If Mitigated
Limited impact with proper file permissions and network segmentation preventing access to critical system files.
🎯 Exploit Status
Path traversal vulnerabilities are commonly exploited and require minimal technical skill.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Versions after 1.0
Vendor Advisory: https://github.com/github/securitylab/issues/669
Restart Required: Yes
Instructions:
1. Update to the latest version of WindMill repository. 2. Restart the WindMill service. 3. Verify the fix by testing path traversal attempts.
🔧 Temporary Workarounds
Input Validation
allImplement strict input validation to reject any file paths containing directory traversal sequences.
File Access Restriction
allConfigure the application to run with minimal file system permissions and restrict access to sensitive directories.
🧯 If You Can't Patch
- Implement a web application firewall (WAF) with path traversal protection rules.
- Isolate the vulnerable system in a segmented network with strict outbound controls.
🔍 How to Verify
Check if Vulnerable:
Test if the application allows accessing files outside the intended directory using path traversal sequences like '../../etc/passwd'.
Check Version:
Check the WindMill version in the application configuration or package manager.
Verify Fix Applied:
Attempt the same path traversal tests after patching to confirm they are blocked.
📡 Detection & Monitoring
Log Indicators:
- Unusual file access patterns, multiple failed attempts to access system files, requests containing '../' sequences
Network Indicators:
- HTTP requests with path traversal sequences in URL parameters
SIEM Query:
source="web_server" AND (url="*../*" OR url="*..\\*" OR url="*%2e%2e%2f*")