CVE-2024-39360
📋 TL;DR
This vulnerability allows authenticated attackers to execute arbitrary operating system commands on Wavlink AC3000 routers through the nas.cgi interface. Attackers can achieve full system compromise by injecting malicious commands into the remove_dir() function. Only users of specific Wavlink router models with vulnerable firmware are affected.
💻 Affected Systems
- Wavlink AC3000
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Complete router takeover allowing installation of persistent malware, credential theft, network pivoting to internal systems, and participation in botnets.
Likely Case
Router compromise leading to DNS hijacking, credential interception, network traffic monitoring, and lateral movement to connected devices.
If Mitigated
Limited impact due to network segmentation, strong authentication controls, and restricted administrative access.
🎯 Exploit Status
Exploitation requires authentication but is straightforward once credentials are obtained. Public technical details available in Talos report.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Unknown
Vendor Advisory: Not available
Restart Required: No
Instructions:
1. Check Wavlink website for firmware updates. 2. Download latest firmware. 3. Log into router admin interface. 4. Navigate to firmware update section. 5. Upload and apply new firmware.
🔧 Temporary Workarounds
Disable NAS functionality
allTurn off Network Attached Storage features if not required
Restrict admin access
linuxLimit administrative interface access to specific IP addresses
iptables -A INPUT -p tcp --dport 80 -s TRUSTED_IP -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -s TRUSTED_IP -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j DROP
iptables -A INPUT -p tcp --dport 443 -j DROP
🧯 If You Can't Patch
- Isolate affected routers in separate VLAN with strict firewall rules
- Implement multi-factor authentication for router administration
🔍 How to Verify
Check if Vulnerable:
Check firmware version in router web interface under System Status or About section
Check Version:
curl -s http://router-ip/cgi-bin/nas.cgi | grep -i version
Verify Fix Applied:
Verify firmware version has been updated to a version newer than M33A8.V5030.210505
📡 Detection & Monitoring
Log Indicators:
- Unusual command execution in system logs
- Multiple failed authentication attempts followed by successful login
- Suspicious HTTP POST requests to /cgi-bin/nas.cgi with shell metacharacters
Network Indicators:
- Unexpected outbound connections from router
- DNS queries to suspicious domains
- Unusual traffic patterns from router IP
SIEM Query:
source="router.log" AND ("nas.cgi" OR "remove_dir") AND ("|" OR ";" OR "$" OR "`")