CVE-2023-25084

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. The buffer overflow occurs in the firewall_handler_set function due to unsafe sprintf usage. Only Milesight UR32L routers running vulnerable firmware are affected.

💻 Affected Systems

Products:
  • Milesight UR32L
Versions: v32.3.0.5
Operating Systems: Embedded Linux
Default Config Vulnerable: ⚠️ Yes
Notes: Requires attacker to have high-privilege access to the router's management interface.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete system compromise with root-level access, allowing attackers to install persistent backdoors, pivot to internal networks, or disrupt network operations.

🟠

Likely Case

Privilege escalation leading to unauthorized configuration changes, data exfiltration, or use as a foothold for lateral movement.

🟢

If Mitigated

Limited impact if proper network segmentation and privilege controls prevent high-privilege access to the vulnerable interface.

🌐 Internet-Facing: MEDIUM - Requires authenticated access with high privileges, but if exposed to internet, attack surface increases significantly.
🏢 Internal Only: HIGH - Internal attackers with administrative access can exploit this to gain full control of the router.

🎯 Exploit Status

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

Exploitation requires authenticated access with high privileges and knowledge of buffer overflow techniques.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: Not available

Restart Required: Yes

Instructions:

1. Check Milesight website for firmware updates. 2. Download latest firmware. 3. Upload via web interface. 4. Apply and reboot router.

🔧 Temporary Workarounds

Restrict Management Access

linux

Limit access to router management interface to trusted IP addresses only

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

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate UR32L routers from critical systems
  • Enforce least privilege access controls and monitor for unusual administrative activity

🔍 How to Verify

Check if Vulnerable:

Check firmware version via web interface: System > Status > Firmware Version

Check Version:

Not applicable - check via web interface

Verify Fix Applied:

Verify firmware version is newer than v32.3.0.5 and test firewall configuration changes

📡 Detection & Monitoring

Log Indicators:

  • Unusual HTTP POST requests to firewall configuration endpoints
  • Multiple failed authentication attempts followed by successful login

Network Indicators:

  • HTTP traffic to router management interface with unusually long parameter values
  • Outbound connections from router to unexpected destinations

SIEM Query:

source="ur32l" AND (http_method="POST" AND uri="/cgi-bin/luci/admin/network/firewall" AND (param_length>1000 OR contains(param,"ip=") OR contains(param,"mac=") OR contains(param,"description=")))

🔗 References

📤 Share & Export