CVE-2023-25086

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 Milesight UR32L routers running vulnerable firmware versions due to unsafe sprintf usage in firewall_handler_set function.

💻 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 via HTTP requests.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

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

🟠

Likely Case

Privileged authenticated attackers gaining remote code execution to modify router configurations, intercept traffic, or use the device as a foothold for lateral movement.

🟢

If Mitigated

Limited impact if proper network segmentation, least privilege access controls, and monitoring are implemented to detect suspicious HTTP requests.

🌐 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 crafting specific HTTP requests to trigger the buffer overflow.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Not specified in available references

Vendor Advisory: Not found in provided references

Restart Required: Yes

Instructions:

1. Check Milesight security advisories for firmware updates. 2. Download and verify the latest firmware. 3. Backup current configuration. 4. Apply firmware update via web interface or CLI. 5. Reboot device. 6. Verify update was successful.

🔧 Temporary Workarounds

Restrict HTTP Access

linux

Limit HTTP 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 Unnecessary Services

linux

Disable HTTP management interface if not required, using alternative management methods.

systemctl stop httpd
systemctl disable httpd

🧯 If You Can't Patch

  • Implement strict network segmentation to isolate UR32L routers from critical networks.
  • Enforce least privilege access controls and monitor for suspicious HTTP requests to the management interface.

🔍 How to Verify

Check if Vulnerable:

Check firmware version via web interface or CLI command: 'cat /etc/version' or similar. If version is v32.3.0.5 or potentially earlier, device is vulnerable.

Check Version:

cat /etc/version

Verify Fix Applied:

After updating firmware, verify version is newer than v32.3.0.5 using same version check command.

📡 Detection & Monitoring

Log Indicators:

  • Unusual HTTP POST requests to firewall-related endpoints
  • Multiple failed authentication attempts followed by successful login and HTTP requests
  • Process crashes or abnormal behavior in vtysh_ubus binary

Network Indicators:

  • HTTP traffic to router management interface containing unusually long parameter values for index or dport
  • Traffic patterns suggesting buffer overflow attempts

SIEM Query:

source="router_logs" AND (http_method="POST" AND uri CONTAINS "firewall" AND (param_length>100 OR contains(buffer_overflow_patterns)))

🔗 References

📤 Share & Export