CVE-2021-38169
📋 TL;DR
CVE-2021-38169 is a command injection vulnerability in Roxy-WI web interface that allows attackers to execute arbitrary commands on the server. This affects Roxy-WI installations up to version 5.2.2.0. Attackers can exploit this to gain unauthorized access and control over affected systems.
💻 Affected Systems
- Roxy-WI
📦 What is this software?
Roxy Wi by Roxy Wi
⚠️ Risk & Real-World Impact
Worst Case
Full system compromise with root-level access, data exfiltration, lateral movement to other systems, and persistent backdoor installation.
Likely Case
Unauthorized command execution leading to service disruption, configuration changes, and potential credential theft.
If Mitigated
Limited impact with proper network segmentation, minimal privileges, and command execution restrictions.
🎯 Exploit Status
Exploitation is straightforward with publicly available proof-of-concept code. No authentication required for vulnerable endpoints.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 5.2.2.1 and later
Vendor Advisory: https://github.com/hap-wi/roxy-wi/issues/285
Restart Required: Yes
Instructions:
1. Backup current configuration. 2. Update Roxy-WI to version 5.2.2.1 or later. 3. Restart Roxy-WI service. 4. Verify the fix by checking version and testing endpoints.
🔧 Temporary Workarounds
Network Access Restriction
linuxRestrict network access to Roxy-WI web interface using firewall rules
iptables -A INPUT -p tcp --dport [roxy-wi-port] -s [trusted-networks] -j ACCEPT
iptables -A INPUT -p tcp --dport [roxy-wi-port] -j DROP
Endpoint Disablement
linuxTemporarily disable vulnerable endpoints until patching
mv /path/to/roxy-wi/app/funct.py /path/to/roxy-wi/app/funct.py.disabled
mv /path/to/roxy-wi/api/api_funct.py /path/to/roxy-wi/api/api_funct.py.disabled
🧯 If You Can't Patch
- Implement strict network segmentation and firewall rules to limit access to Roxy-WI interface
- Deploy web application firewall (WAF) with command injection protection rules
🔍 How to Verify
Check if Vulnerable:
Check Roxy-WI version and examine if vulnerable endpoints exist: ls -la /path/to/roxy-wi/app/funct.py /path/to/roxy-wi/api/api_funct.py
Check Version:
grep 'version' /path/to/roxy-wi/config/settings.cfg or check web interface footer
Verify Fix Applied:
Verify version is 5.2.2.1 or later and test endpoints with safe payloads to confirm command injection is prevented
📡 Detection & Monitoring
Log Indicators:
- Unusual command execution patterns in system logs
- Suspicious POST requests to /app/funct.py or /api/api_funct.py with shell metacharacters
Network Indicators:
- HTTP requests containing shell commands or special characters to vulnerable endpoints
- Outbound connections from Roxy-WI server to unexpected destinations
SIEM Query:
source="roxy-wi-logs" AND (url="/app/funct.py" OR url="/api/api_funct.py") AND (request_body CONTAINS "|" OR request_body CONTAINS ";" OR request_body CONTAINS "`" OR request_body CONTAINS "$")