CVE-2022-31311

9.8 CRITICAL

📋 TL;DR

This vulnerability allows unauthenticated attackers to execute arbitrary operating system commands on WAVLINK AERIAL X 1200M routers by sending specially crafted POST requests to the adm.cgi endpoint. Attackers can gain full control of affected devices, potentially compromising network security. Organizations and individuals using these routers are affected.

💻 Affected Systems

Products:
  • WAVLINK AERIAL X 1200M M79X3
Versions: V5030.180719
Operating Systems: Embedded Linux
Default Config Vulnerable: ⚠️ Yes
Notes: The adm.cgi endpoint appears to be accessible by default without authentication requirements.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete device takeover leading to persistent backdoor installation, network traffic interception, lateral movement to other devices, and participation in botnets or ransomware attacks.

🟠

Likely Case

Remote code execution allowing attackers to modify router settings, steal credentials, redirect traffic, or use the device as a pivot point for further attacks.

🟢

If Mitigated

Limited impact if devices are behind firewalls, not internet-facing, and network segmentation prevents lateral movement.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

The vulnerability requires sending a crafted POST request to a specific endpoint, which is straightforward for attackers with basic scripting knowledge.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: Not found

Restart Required: No

Instructions:

Check WAVLINK website for firmware updates. If available: 1. Download latest firmware from vendor site. 2. Access router admin interface. 3. Navigate to firmware update section. 4. Upload and apply new firmware. 5. Verify update completed successfully.

🔧 Temporary Workarounds

Block adm.cgi Access

linux

Use firewall rules to block external access to the adm.cgi endpoint

iptables -A INPUT -p tcp --dport 80 -m string --string "adm.cgi" --algo bm -j DROP
iptables -A INPUT -p tcp --dport 443 -m string --string "adm.cgi" --algo bm -j DROP

Disable Remote Administration

all

Turn off remote management features in router settings

🧯 If You Can't Patch

  • Isolate affected routers in separate network segments with strict firewall rules
  • Implement network monitoring and intrusion detection for suspicious POST requests to adm.cgi

🔍 How to Verify

Check if Vulnerable:

Test if adm.cgi endpoint accepts POST requests with command injection payloads. Use curl: curl -X POST http://router-ip/adm.cgi --data 'test=;id'

Check Version:

Check router web interface or use: curl http://router-ip/status.cgi | grep version

Verify Fix Applied:

Attempt the same exploit after applying mitigations - should receive access denied or no command execution

📡 Detection & Monitoring

Log Indicators:

  • POST requests to /adm.cgi with shell metacharacters
  • Unusual command execution in system logs
  • Failed authentication attempts followed by POST to adm.cgi

Network Indicators:

  • POST requests to adm.cgi containing semicolons, pipes, or backticks
  • Outbound connections from router to suspicious IPs

SIEM Query:

source="router_logs" AND (uri_path="/adm.cgi" AND http_method="POST" AND (raw_request CONTAINS ";" OR raw_request CONTAINS "|" OR raw_request CONTAINS "`"))

🔗 References

📤 Share & Export