CVE-2023-25112

7.2 HIGH

📋 TL;DR

This vulnerability allows authenticated attackers to execute arbitrary code on Milesight UR32L routers by exploiting buffer overflows in the vtysh_ubus binary. Attackers with high privileges can send specially crafted HTTP requests to trigger these vulnerabilities, potentially gaining full control of affected devices. This affects Milesight UR32L routers running vulnerable firmware versions.

💻 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 with high privileges; affects vtysh_ubus binary handling L2TP configuration

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete device compromise leading to persistent backdoor installation, network pivoting, data exfiltration, and use as attack platform

🟠

Likely Case

Privileged attacker gains root access to router, modifies configurations, intercepts traffic, or installs malware

🟢

If Mitigated

Attack contained to isolated network segment with limited impact due to network segmentation and monitoring

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires authenticated access with high privileges; buffer overflow occurs in set_l2tp function with remote_subnet and remote_mask variables

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Unknown

Vendor Advisory: Not available

Restart Required: Yes

Instructions:

1. Check vendor website for firmware updates
2. Download latest firmware
3. Backup current configuration
4. Upload and install new firmware
5. Restart device
6. Restore configuration if needed

🔧 Temporary Workarounds

Restrict HTTP Management Access

linux

Limit HTTP management interface access 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

Disable Unnecessary Services

linux

Disable HTTP management interface if not required

systemctl stop httpd
systemctl disable httpd

🧯 If You Can't Patch

  • Segment affected routers in isolated network zones
  • Implement strict access controls and monitor for suspicious HTTP requests to management interface

🔍 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

📡 Detection & Monitoring

Log Indicators:

  • Unusual HTTP POST requests to management interface
  • Multiple failed authentication attempts followed by successful login
  • Process crashes of vtysh_ubus binary

Network Indicators:

  • HTTP requests with unusually long parameters in L2TP configuration endpoints
  • Traffic patterns suggesting reverse shells or command execution

SIEM Query:

source="router_logs" AND (http_uri="*set_l2tp*" AND http_param_length>1000)

🔗 References

📤 Share & Export