CVE-2023-25123: CWE-121: Stack-based Buffer Overflow in Milesight UR32L
Multiple buffer overflow vulnerabilities exist in the vtysh_ubus binary of Milesight UR32L v32.3.0.5 due to the use of an unsafe sprintf pattern. A specially crafted HTTP request can lead to arbitrary code execution. An attacker with high privileges can send HTTP requests to trigger these vulnerabilities.This buffer overflow occurs in the set_openvpn_client function with the remote_subnet and the remote_mask variables when action is 2.
AI Analysis
Technical Summary
CVE-2023-25123 is a stack-based buffer overflow vulnerability identified in the vtysh_ubus binary of the Milesight UR32L router, specifically version 32.3.0.5. The root cause is the unsafe use of the sprintf function within the set_openvpn_client function, which handles configuration parameters remote_subnet and remote_mask when the action parameter equals 2. This unsafe pattern allows an attacker with high privileges to craft a malicious HTTP request that overflows the stack buffer, overwriting adjacent memory and enabling arbitrary code execution. The vulnerability affects the confidentiality, integrity, and availability of the device, as an attacker could execute arbitrary code, potentially gaining control over the device or disrupting its operation. Exploitation requires high privileges, meaning the attacker must already have significant access to the device or network. No user interaction is necessary once the attacker has the required privileges. The CVSS v3.1 base score is 7.2, reflecting the network attack vector, low attack complexity, required privileges, and high impact on confidentiality, integrity, and availability. Although no public exploits are currently known, the vulnerability poses a significant risk to organizations relying on this device for network connectivity and VPN services. The lack of available patches at the time of disclosure increases the urgency for mitigations or vendor updates.
Potential Impact
For European organizations, exploitation of this vulnerability could lead to full compromise of affected Milesight UR32L devices, which are often used in industrial, enterprise, and critical infrastructure networks. Successful exploitation could allow attackers to execute arbitrary code, potentially leading to unauthorized access to internal networks, interception or manipulation of sensitive data, disruption of VPN services, and denial of network availability. This could have severe consequences for sectors such as manufacturing, energy, transportation, and government agencies that rely on these devices for secure communications. The requirement for high privileges limits the attack surface but does not eliminate risk, especially in environments where internal threat actors or lateral movement by attackers is possible. The absence of known exploits in the wild suggests limited current exploitation but also indicates a window of opportunity for attackers to develop exploits before patches are widely deployed.
Mitigation Recommendations
European organizations should immediately inventory their network to identify any Milesight UR32L devices running version 32.3.0.5. Until a vendor patch is available, organizations should restrict access to the management interfaces of these devices to trusted administrators only, ideally through isolated management networks or VPNs with multi-factor authentication. Network segmentation should be enforced to limit the ability of attackers to reach vulnerable devices. Monitoring and logging of HTTP requests to the device should be enhanced to detect anomalous or suspicious activity targeting the vtysh_ubus binary. If possible, disable or restrict OpenVPN client configuration changes via HTTP requests to reduce exposure. Organizations should engage with Milesight for updates or patches and apply them promptly once released. Additionally, conduct regular vulnerability assessments and penetration tests focusing on network devices to detect exploitation attempts. Incident response plans should be updated to include scenarios involving network device compromise.
Affected Countries
Germany, France, United Kingdom, Italy, Spain, Netherlands, Poland, Belgium, Sweden, Czech Republic
CVE-2023-25123: CWE-121: Stack-based Buffer Overflow in Milesight UR32L
Description
Multiple buffer overflow vulnerabilities exist in the vtysh_ubus binary of Milesight UR32L v32.3.0.5 due to the use of an unsafe sprintf pattern. A specially crafted HTTP request can lead to arbitrary code execution. An attacker with high privileges can send HTTP requests to trigger these vulnerabilities.This buffer overflow occurs in the set_openvpn_client function with the remote_subnet and the remote_mask variables when action is 2.
AI-Powered Analysis
Technical Analysis
CVE-2023-25123 is a stack-based buffer overflow vulnerability identified in the vtysh_ubus binary of the Milesight UR32L router, specifically version 32.3.0.5. The root cause is the unsafe use of the sprintf function within the set_openvpn_client function, which handles configuration parameters remote_subnet and remote_mask when the action parameter equals 2. This unsafe pattern allows an attacker with high privileges to craft a malicious HTTP request that overflows the stack buffer, overwriting adjacent memory and enabling arbitrary code execution. The vulnerability affects the confidentiality, integrity, and availability of the device, as an attacker could execute arbitrary code, potentially gaining control over the device or disrupting its operation. Exploitation requires high privileges, meaning the attacker must already have significant access to the device or network. No user interaction is necessary once the attacker has the required privileges. The CVSS v3.1 base score is 7.2, reflecting the network attack vector, low attack complexity, required privileges, and high impact on confidentiality, integrity, and availability. Although no public exploits are currently known, the vulnerability poses a significant risk to organizations relying on this device for network connectivity and VPN services. The lack of available patches at the time of disclosure increases the urgency for mitigations or vendor updates.
Potential Impact
For European organizations, exploitation of this vulnerability could lead to full compromise of affected Milesight UR32L devices, which are often used in industrial, enterprise, and critical infrastructure networks. Successful exploitation could allow attackers to execute arbitrary code, potentially leading to unauthorized access to internal networks, interception or manipulation of sensitive data, disruption of VPN services, and denial of network availability. This could have severe consequences for sectors such as manufacturing, energy, transportation, and government agencies that rely on these devices for secure communications. The requirement for high privileges limits the attack surface but does not eliminate risk, especially in environments where internal threat actors or lateral movement by attackers is possible. The absence of known exploits in the wild suggests limited current exploitation but also indicates a window of opportunity for attackers to develop exploits before patches are widely deployed.
Mitigation Recommendations
European organizations should immediately inventory their network to identify any Milesight UR32L devices running version 32.3.0.5. Until a vendor patch is available, organizations should restrict access to the management interfaces of these devices to trusted administrators only, ideally through isolated management networks or VPNs with multi-factor authentication. Network segmentation should be enforced to limit the ability of attackers to reach vulnerable devices. Monitoring and logging of HTTP requests to the device should be enhanced to detect anomalous or suspicious activity targeting the vtysh_ubus binary. If possible, disable or restrict OpenVPN client configuration changes via HTTP requests to reduce exposure. Organizations should engage with Milesight for updates or patches and apply them promptly once released. Additionally, conduct regular vulnerability assessments and penetration tests focusing on network devices to detect exploitation attempts. Incident response plans should be updated to include scenarios involving network device compromise.
For access to advanced analysis and higher rate limits, contact root@offseq.com
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- talos
- Date Reserved
- 2023-02-02T20:42:36.078Z
- Cvss Version
- 3.1
- State
- PUBLISHED
Threat ID: 690a531d2a90255b94da5f22
Added to database: 11/4/2025, 7:25:17 PM
Last enriched: 11/4/2025, 8:49:09 PM
Last updated: 11/6/2025, 1:35:01 PM
Views: 3
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Related Threats
CVE-2024-5651: Improper Control of Generation of Code ('Code Injection')
HighCVE-2024-57520: n/a
CriticalCVE-2025-11268: CWE-79 Improper Neutralization of Input During Web Page Generation ('Cross-site Scripting') in wpchill Strong Testimonials
MediumCVE-2025-12360: CWE-285 Improper Authorization in codesolz Better Find and Replace – AI-Powered Suggestions
MediumCVE-2025-10259: CWE-1284 Improper Validation of Specified Quantity in Input in Mitsubishi Electric Corporation MELSEC iQ-F Series FX5U-32MT/ES
MediumActions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need enhanced features?
Contact root@offseq.com for Pro access with improved analysis and higher rate limits.