CVE-2025-51630

9.8 CRITICAL

📋 TL;DR

This vulnerability allows remote attackers to execute arbitrary code on TOTOLINK N350RT routers by exploiting a buffer overflow in the ePort parameter. Attackers can gain full control of affected devices, potentially compromising entire networks. Only users of specific TOTOLINK N350RT firmware versions are affected.

💻 Affected Systems

Products:
  • TOTOLINK N350RT
Versions: V9.3.5u.6139_B20201216
Operating Systems: Embedded Linux
Default Config Vulnerable: ⚠️ Yes
Notes: Affects the web management interface. Devices with default configurations are vulnerable if exposed to network access.

📦 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.

🟠

Likely Case

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

🟢

If Mitigated

Limited impact if device is behind firewall with restricted WAN access and proper network segmentation is implemented.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Public proof-of-concept available on GitHub. Exploitation requires network access to the router's web interface.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: Unknown

Restart Required: Yes

Instructions:

1. Check TOTOLINK website for firmware updates. 2. Download latest firmware. 3. Access router web interface. 4. Navigate to firmware upgrade section. 5. Upload new firmware file. 6. Wait for reboot.

🔧 Temporary Workarounds

Restrict Network Access

linux

Block external access to router management 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

all

Turn off remote administration features in router settings.

🧯 If You Can't Patch

  • Isolate affected routers in separate VLAN with strict access controls
  • Implement network monitoring for suspicious traffic to/from router management interface

🔍 How to Verify

Check if Vulnerable:

Check router firmware version via web interface at System Status > Firmware Version

Check Version:

curl -s http://router-ip/status.cgi | grep firmware

Verify Fix Applied:

Verify firmware version has changed from V9.3.5u.6139_B20201216

📡 Detection & Monitoring

Log Indicators:

  • Unusual POST requests to setIpPortFilterRules endpoint
  • Multiple failed login attempts followed by successful access

Network Indicators:

  • Unusual outbound connections from router
  • Traffic to known malicious IPs from router

SIEM Query:

source="router.log" AND (uri="/cgi-bin/setIpPortFilterRules" OR "ePort=" AND content_length>100)

🔗 References

📤 Share & Export