CVE-2021-20731

8.8 HIGH

📋 TL;DR

This vulnerability allows remote attackers to execute arbitrary operating system commands with root privileges on affected Buffalo WSR-1166DHP3 and WSR-1166DHP4 wireless routers. Attackers can gain complete control of the device through unspecified vectors. Organizations and individuals using these specific router models with vulnerable firmware versions are affected.

💻 Affected Systems

Products:
  • Buffalo WSR-1166DHP3
  • Buffalo WSR-1166DHP4
Versions: WSR-1166DHP3 firmware Ver.1.16 and prior, WSR-1166DHP4 firmware Ver.1.02 and prior
Operating Systems: Embedded router firmware
Default Config Vulnerable: ⚠️ Yes
Notes: All default configurations are vulnerable. No special configuration required for exploitation.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete compromise of the router allowing attackers to intercept all network traffic, install persistent backdoors, pivot to internal networks, or use the device for botnet activities.

🟠

Likely Case

Attackers gain root access to the router, enabling them to modify DNS settings, intercept credentials, or disable security features.

🟢

If Mitigated

If properly segmented and monitored, impact limited to the router itself with minimal lateral movement potential.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

The advisory mentions 'unspecified vectors' but confirms unauthenticated remote code execution with root privileges.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: WSR-1166DHP3 firmware Ver.1.17 or later, WSR-1166DHP4 firmware Ver.1.03 or later

Vendor Advisory: https://www.buffalo.jp/news/detail/20210531-01.html

Restart Required: Yes

Instructions:

1. Download latest firmware from Buffalo support site. 2. Log into router admin interface. 3. Navigate to firmware update section. 4. Upload and apply new firmware. 5. Wait for automatic reboot.

🔧 Temporary Workarounds

Network Segmentation

all

Isolate affected routers in separate network segments to limit potential lateral movement.

Access Control Lists

all

Implement strict firewall rules to limit access to router management interfaces.

🧯 If You Can't Patch

  • Replace affected routers with patched or alternative models
  • Implement network monitoring for suspicious router traffic and configuration changes

🔍 How to Verify

Check if Vulnerable:

Check router admin interface for firmware version. If WSR-1166DHP3 is ≤1.16 or WSR-1166DHP4 is ≤1.02, device is vulnerable.

Check Version:

Login to router web interface and check System Information or Firmware Update page

Verify Fix Applied:

After update, confirm firmware version shows WSR-1166DHP3 ≥1.17 or WSR-1166DHP4 ≥1.03 in admin interface.

📡 Detection & Monitoring

Log Indicators:

  • Unexpected configuration changes
  • Unusual process execution
  • Failed authentication attempts to router

Network Indicators:

  • Unusual outbound connections from router
  • DNS hijacking patterns
  • Traffic redirection

SIEM Query:

source="router_logs" AND (event_type="config_change" OR event_type="command_execution")

🔗 References

📤 Share & Export