CVE-2024-36782

9.8 CRITICAL

📋 TL;DR

This vulnerability allows attackers to gain root access to TOTOLINK CP300 routers by using a hardcoded password found in a sample configuration file. Anyone using the affected firmware version is vulnerable to complete system compromise. The hardcoded credentials enable unauthorized administrative control over the device.

💻 Affected Systems

Products:
  • TOTOLINK CP300
Versions: V2.0.4-B20201102
Operating Systems: Embedded Linux
Default Config Vulnerable: ⚠️ Yes
Notes: All devices running this firmware version are vulnerable by default.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers gain persistent root access, install malware, pivot to internal networks, intercept all traffic, and brick devices.

🟠

Likely Case

Attackers gain root access to vulnerable devices, modify configurations, intercept network traffic, and use devices for botnets.

🟢

If Mitigated

With proper network segmentation and access controls, impact is limited to the compromised device only.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires only knowledge of the hardcoded password and SSH/Telnet access to the device.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: None known

Restart Required: No

Instructions:

No official patch available. Check vendor website for firmware updates and apply if available.

🔧 Temporary Workarounds

Change root password

linux

Manually change the root password to a strong, unique password

passwd root

Remove /etc/shadow.sample

linux

Delete the vulnerable sample file containing hardcoded credentials

rm /etc/shadow.sample

🧯 If You Can't Patch

  • Isolate affected devices in separate VLAN with strict firewall rules
  • Disable remote management interfaces and restrict SSH/Telnet to internal networks only

🔍 How to Verify

Check if Vulnerable:

Check if /etc/shadow.sample exists and contains hardcoded credentials. Use command: cat /etc/shadow.sample

Check Version:

Check firmware version in web interface or use: cat /proc/version

Verify Fix Applied:

Verify /etc/shadow.sample is removed and root password has been changed. Use command: ls -la /etc/shadow.sample && echo 'Check password changed'

📡 Detection & Monitoring

Log Indicators:

  • Failed SSH/Telnet login attempts followed by successful root login
  • Unexpected configuration changes
  • New SSH keys or users

Network Indicators:

  • Unusual outbound connections from router
  • SSH/Telnet connections from unexpected IPs
  • DNS or routing configuration changes

SIEM Query:

source="router_logs" (event="authentication success" AND user="root") OR (event="configuration change")

🔗 References

📤 Share & Export