CVE-2023-40041

9.8 CRITICAL

📋 TL;DR

This vulnerability allows remote attackers to execute arbitrary code on TOTOLINK T10_v2 routers by exploiting a stack-based buffer overflow in the WPS configuration module. Attackers can send specially crafted MQTT packets containing malicious data in the pin parameter to hijack program execution. This affects TOTOLINK T10_v2 router users running vulnerable firmware versions.

💻 Affected Systems

Products:
  • TOTOLINK T10_v2 router
Versions: Firmware version 5.9c.5061_B20200511
Operating Systems: Embedded Linux
Default Config Vulnerable: ⚠️ Yes
Notes: The vulnerability exists in the default WPS configuration module and is accessible via MQTT protocol.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete device compromise allowing attackers to install persistent malware, pivot to internal networks, intercept all network traffic, and use the device as part of a botnet.

🟠

Likely Case

Remote code execution leading to device takeover, credential theft, network surveillance, and potential lateral movement to other devices on the network.

🟢

If Mitigated

Limited impact if devices are behind firewalls with strict MQTT protocol filtering and network segmentation.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Public GitHub repository contains vulnerability details and proof-of-concept information. The exploit requires sending crafted MQTT packets to the vulnerable endpoint.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: Unknown

Restart Required: No

Instructions:

Check TOTOLINK official website for firmware updates. If available, download the latest firmware and follow vendor's update instructions via the router's web interface.

🔧 Temporary Workarounds

Disable WPS functionality

all

Turn off Wi-Fi Protected Setup (WPS) feature in router configuration

Block MQTT traffic

linux

Configure firewall rules to block MQTT protocol (port 1883 typically) from untrusted networks

iptables -A INPUT -p tcp --dport 1883 -j DROP

🧯 If You Can't Patch

  • Segment affected routers on isolated network segments
  • Implement strict network access controls to limit MQTT traffic to trusted sources only

🔍 How to Verify

Check if Vulnerable:

Check router firmware version via web interface (typically at 192.168.1.1) and compare against vulnerable version 5.9c.5061_B20200511

Check Version:

Check router web interface under System Status or Firmware Update section

Verify Fix Applied:

Verify firmware version has been updated to a version newer than 5.9c.5061_B20200511

📡 Detection & Monitoring

Log Indicators:

  • Unusual MQTT connection attempts
  • Multiple failed WPS configuration attempts
  • Abnormal process crashes in wps module

Network Indicators:

  • MQTT packets with unusually long pin parameters
  • Traffic to port 1883 with malformed payloads

SIEM Query:

source="router_logs" AND ("MQTT" OR "WPS") AND ("overflow" OR "crash" OR "malformed")

🔗 References

📤 Share & Export