CVE-2024-1002

7.2 HIGH

📋 TL;DR

A critical stack-based buffer overflow vulnerability exists in Totolink N200RE routers running firmware version 9.3.5u.6139_B20201216. Attackers can remotely exploit this by sending specially crafted requests to the setIpPortFilterRules function, potentially allowing arbitrary code execution. This affects all users of the vulnerable router firmware.

💻 Affected Systems

Products:
  • Totolink N200RE
Versions: 9.3.5u.6139_B20201216
Operating Systems: Embedded Linux
Default Config Vulnerable: ⚠️ Yes
Notes: All devices running this specific firmware version are vulnerable by default.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Remote attackers gain full control of the router, enabling them to intercept traffic, pivot to internal networks, install persistent malware, or brick the device.

🟠

Likely Case

Remote code execution leading to router compromise, network traffic interception, and potential lateral movement to connected devices.

🟢

If Mitigated

If properly segmented and monitored, impact limited to router compromise without significant network penetration.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploit details are publicly available, making weaponization likely. No authentication required for exploitation.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None available

Restart Required: Yes

Instructions:

1. Check Totolink website for firmware updates
2. If update available, download and flash via web interface
3. Factory reset recommended after update
4. Reconfigure router settings

🔧 Temporary Workarounds

Disable Remote Management

all

Prevents external exploitation by disabling remote access to router administration

Access router web interface > Administration > Remote Management > Disable

Network Segmentation

all

Isolate router on separate VLAN to limit potential lateral movement

🧯 If You Can't Patch

  • Replace vulnerable router with different model or updated firmware
  • Implement strict network segmentation and firewall rules to limit router access

🔍 How to Verify

Check if Vulnerable:

Check router firmware version in web interface: Login > System > Firmware Upgrade

Check Version:

Check web interface or use nmap -sV to identify router version

Verify Fix Applied:

Verify firmware version is no longer 9.3.5u.6139_B20201216

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests to /cgi-bin/cstecgi.cgi with setIpPortFilterRules parameter
  • Multiple failed exploitation attempts

Network Indicators:

  • Unusual traffic to router port 80/443 from external IPs
  • POST requests with long ePort parameter values

SIEM Query:

source_ip=external AND dest_port=80 AND uri_path="/cgi-bin/cstecgi.cgi" AND http_method="POST" AND params CONTAINS "setIpPortFilterRules"

🔗 References

📤 Share & Export