CVE-2024-51138

9.8 CRITICAL

📋 TL;DR

A critical stack-based buffer overflow vulnerability in DrayTek router TR069 STUN server URL parsing allows remote attackers to execute arbitrary code with elevated privileges. This affects multiple DrayTek Vigor router models running vulnerable firmware versions. Attackers can exploit this without authentication to gain complete control of affected devices.

💻 Affected Systems

Products:
  • Vigor165
  • Vigor166
  • Vigor2620
  • LTE200
  • Vigor2860
  • Vigor2925
  • Vigor2862
  • Vigor2926
  • Vigor2133
  • Vigor2762
  • Vigor2832
  • Vigor2135
  • Vigor2765
  • Vigor2766
  • Vigor2865
  • Vigor2866
  • Vigor2927
  • Vigor2962
  • Vigor3912
  • Vigor3910
Versions: Varies by model: Vigor165/166 4.2.7 and earlier; Vigor2620/LTE200 3.9.8.9 and earlier; Vigor2860/2925 3.9.8 and earlier; Vigor2862/2926 3.9.9.5 and earlier; Vigor2133/2762/2832 3.9.9 and earlier; Vigor2135/2765/2766 4.4.5 and earlier; Vigor2865/2866/2927 4.4.5.3 and earlier; Vigor2962 4.3.2.8 and earlier; Vigor3912 4.3.6.1 and earlier; Vigor3910 4.4.3.1 and earlier
Operating Systems: DrayTek firmware
Default Config Vulnerable: ⚠️ Yes
Notes: TR069 STUN server is typically enabled by default for remote management. Devices exposed to WAN are immediately vulnerable.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete device compromise leading to network infiltration, data exfiltration, ransomware deployment, and persistent backdoor installation across the entire network.

🟠

Likely Case

Router takeover enabling man-in-the-middle attacks, credential theft, network traffic interception, and lateral movement to connected systems.

🟢

If Mitigated

Limited impact if devices are behind firewalls with strict inbound filtering, though internal threats remain possible.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

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

CVSS 9.8 indicates trivial exploitation with high impact. No authentication required. Technical details are public in advisory.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Check DrayTek website for specific model updates

Vendor Advisory: http://draytek.com

Restart Required: Yes

Instructions:

1. Visit DrayTek support portal. 2. Download latest firmware for your specific model. 3. Backup router configuration. 4. Upload firmware via web interface. 5. Reboot router. 6. Verify firmware version updated.

🔧 Temporary Workarounds

Disable TR069 STUN Server

all

Turn off vulnerable TR069 STUN service to prevent exploitation

Restrict WAN Access

all

Block inbound TR069 ports (typically 7547, 34567) at firewall

🧯 If You Can't Patch

  • Isolate affected routers in separate VLAN with strict access controls
  • Implement network segmentation to limit lateral movement if compromised

🔍 How to Verify

Check if Vulnerable:

Check router web interface for model and firmware version, compare against affected versions list

Check Version:

Login to router web interface and navigate to System Maintenance > Firmware Information

Verify Fix Applied:

Confirm firmware version is above vulnerable threshold for your specific model

📡 Detection & Monitoring

Log Indicators:

  • Unusual TR069 connection attempts
  • Multiple malformed URL parameter requests
  • Unexpected router reboots or configuration changes

Network Indicators:

  • Excessive traffic to TR069 ports (7547, 34567)
  • Suspicious outbound connections from router

SIEM Query:

source_ip=router_ip AND (dest_port=7547 OR dest_port=34567) AND url_length>threshold

🔗 References

📤 Share & Export