CVE-2023-25104

7.2 HIGH

📋 TL;DR

This vulnerability allows authenticated attackers to execute arbitrary code on Milesight UR32L routers by sending specially crafted HTTP requests that trigger buffer overflows in the vtysh_ubus binary. The vulnerability affects systems running vulnerable firmware versions and requires attacker privileges to exploit.

💻 Affected Systems

Products:
  • Milesight UR32L
Versions: v32.3.0.5 and potentially earlier versions
Operating Systems: Embedded Linux
Default Config Vulnerable: ⚠️ Yes
Notes: The vtysh_ubus service is typically enabled by default for router management functionality.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise allowing attackers to install persistent backdoors, pivot to internal networks, or use the device as part of a botnet.

🟠

Likely Case

Local privilege escalation leading to full control of the router, enabling traffic interception, configuration changes, and lateral movement.

🟢

If Mitigated

Limited impact if proper network segmentation and access controls prevent unauthorized users from reaching the vulnerable service.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires authenticated access to the HTTP interface and knowledge of the vulnerable function parameters.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Not available

Vendor Advisory: Not available

Restart Required: No

Instructions:

1. Monitor Milesight security advisories for patch availability
2. Apply firmware updates when released
3. Verify patch installation by checking firmware version

🔧 Temporary Workarounds

Network Segmentation

linux

Restrict access to the router's management interface to trusted networks only

iptables -A INPUT -p tcp --dport 80 -s TRUSTED_NETWORK -j ACCEPT
iptables -A INPUT -p tcp --dport 80 -j DROP

Disable Vulnerable Service

linux

Disable the vtysh_ubus service if not required for operation

killall vtysh_ubus
chmod -x /path/to/vtysh_ubus

🧯 If You Can't Patch

  • Implement strict network access controls to limit who can reach the router's management interface
  • Monitor for unusual HTTP requests to the router's web interface and investigate any anomalies

🔍 How to Verify

Check if Vulnerable:

Check firmware version via web interface or SSH: cat /etc/version

Check Version:

cat /etc/version

Verify Fix Applied:

Verify firmware version is updated beyond v32.3.0.5 when patch becomes available

📡 Detection & Monitoring

Log Indicators:

  • Unusual HTTP POST requests to router management interface
  • Multiple failed authentication attempts followed by successful login

Network Indicators:

  • HTTP traffic to router management interface from unexpected sources
  • Unusual outbound connections from the router

SIEM Query:

source="router_logs" AND (http_method="POST" AND uri="/cgi-bin/luci" AND (user_agent CONTAINS "curl" OR user_agent CONTAINS "python"))

🔗 References

📤 Share & Export