CVE-2023-25098

7.2 HIGH

📋 TL;DR

This vulnerability allows authenticated attackers with high privileges 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 can lead to complete system compromise.

💻 Affected Systems

Products:
  • Milesight UR32L
Versions: v32.3.0.5 and potentially earlier versions
Operating Systems: Embedded Linux
Default Config Vulnerable: ⚠️ Yes
Notes: Requires attacker to have high privileges (authenticated access) to exploit. The vulnerability is in the vtysh_ubus binary used for QoS configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system takeover with root privileges, enabling persistent backdoor installation, data exfiltration, and use as a pivot point for attacking other network devices.

🟠

Likely Case

Privilege escalation leading to unauthorized configuration changes, network traffic interception, or denial of service affecting router functionality.

🟢

If Mitigated

Limited impact if proper network segmentation, privilege separation, and input validation are implemented, though the vulnerability remains present.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: HIGH

🎯 Exploit Status

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

Exploitation requires authenticated access with high privileges and knowledge of the vulnerable set_qos function. No public exploit code has been identified.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: No vendor advisory found at time of analysis

Restart Required: Yes

Instructions:

1. Contact Milesight support for firmware updates. 2. Check vendor website for security advisories. 3. Apply any available firmware patches. 4. Reboot the device after patching.

🔧 Temporary Workarounds

Restrict Administrative Access

linux

Limit access to the router's administrative interface to trusted IP addresses only

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

Disable Unnecessary Services

linux

Disable HTTP/HTTPS administrative interfaces if not required

systemctl stop httpd
systemctl disable httpd
systemctl stop lighttpd
systemctl disable lighttpd

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate UR32L routers from critical network segments
  • Deploy network-based intrusion prevention systems (IPS) to detect and block exploit attempts

🔍 How to Verify

Check if Vulnerable:

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

Check Version:

cat /etc/version || show version || grep -i version /proc/version

Verify Fix Applied:

Verify firmware version has been updated beyond v32.3.0.5 and test QoS functionality

📡 Detection & Monitoring

Log Indicators:

  • Unusual HTTP requests to administrative interfaces
  • Multiple failed authentication attempts followed by QoS configuration changes
  • Process crashes of vtysh_ubus binary

Network Indicators:

  • HTTP POST requests with unusually long parameters to QoS configuration endpoints
  • Traffic patterns suggesting buffer overflow attempts

SIEM Query:

source="router_logs" AND (http_method="POST" AND uri="/cgi-bin/luci/admin/network/qos" AND content_length>1000)

🔗 References

📤 Share & Export