CVE-2022-31519

9.3 CRITICAL

📋 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

Products:
  • Lukasavicus/WindMill
Versions: through 1.0
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Affects all deployments using the vulnerable Flask send_file implementation.

📦 What is this software?

⚠️ 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.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ⚠️ Yes
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

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

all

Implement strict input validation to reject any file paths containing directory traversal sequences.

File Access Restriction

all

Configure 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*")

🔗 References

📤 Share & Export