CVE-2022-34577
📋 TL;DR
This vulnerability allows unauthenticated attackers to execute arbitrary code on WAVLINK WN535 G3 routers by sending a specially crafted POST request to the adm.cgi endpoint. It affects all users of this specific router model running vulnerable firmware. The high CVSS score indicates critical severity with network-accessible attack vectors.
💻 Affected Systems
- WAVLINK WN535 G3
📦 What is this software?
⚠️ Risk & Real-World Impact
Worst Case
Complete compromise of the router allowing attackers to install persistent backdoors, intercept all network traffic, pivot to internal networks, or brick the device.
Likely Case
Remote code execution leading to router compromise, credential theft, DNS hijacking, or participation in botnets.
If Mitigated
Limited impact if device is behind firewall with no external access, though internal threats remain.
🎯 Exploit Status
Public GitHub repository contains proof-of-concept exploit code. The vulnerability requires only HTTP POST requests with crafted parameters.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: Unknown
Vendor Advisory: Not found in provided references
Restart Required: No
Instructions:
Check WAVLINK official website for firmware updates. If available, download latest firmware and upload via web admin interface under System Tools > Firmware Upgrade.
🔧 Temporary Workarounds
Block Web Admin Access
linuxRestrict access to router web interface using firewall rules
iptables -A INPUT -p tcp --dport 80 -j DROP
iptables -A INPUT -p tcp --dport 443 -j DROP
Disable Remote Management
allTurn off remote administration in router settings
🧯 If You Can't Patch
- Place router behind a firewall that blocks all inbound HTTP/HTTPS traffic to the device
- Segment the router on isolated network VLAN to limit lateral movement if compromised
🔍 How to Verify
Check if Vulnerable:
Check firmware version in web admin interface under System Status. If version is M35G3R.V5030.180927 or earlier, assume vulnerable.
Check Version:
curl -s http://router-ip/cgi-bin/adm.cgi | grep -i version
Verify Fix Applied:
Verify firmware version has been updated to a version later than M35G3R.V5030.180927
📡 Detection & Monitoring
Log Indicators:
- Unusual POST requests to /cgi-bin/adm.cgi
- Multiple failed authentication attempts followed by successful adm.cgi access
- Suspicious command execution patterns in system logs
Network Indicators:
- HTTP POST requests to adm.cgi with unusual parameters
- Outbound connections from router to suspicious IPs
- DNS queries to known malicious domains
SIEM Query:
source="router_logs" AND (uri="/cgi-bin/adm.cgi" OR uri="/adm.cgi") AND method="POST"
🔗 References
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-31311
- https://github.com/pghuanghui/CVE_Request/blob/main/WAVLINK%20WN535%20G3_Command%20Execution%20Vulnerability.md
- https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-31311
- https://github.com/pghuanghui/CVE_Request/blob/main/WAVLINK%20WN535%20G3_Command%20Execution%20Vulnerability.md