CVE-2024-0575 Overview
A critical stack-based buffer overflow vulnerability has been identified in the Totolink LR1200GB router firmware version 9.1.0u.6619_B20230130. The vulnerability exists in the setTracerouteCfg function within the /cgi-bin/cstecgi.cgi file, where improper handling of the command argument allows remote attackers to trigger a stack-based buffer overflow. This flaw can be exploited remotely without authentication, potentially leading to complete device compromise including arbitrary code execution, denial of service, or full system takeover.
Critical Impact
Remote unauthenticated attackers can exploit this buffer overflow to execute arbitrary code on vulnerable Totolink LR1200GB routers, potentially gaining complete control over the network device and compromising network security.
Affected Products
- Totolink LR1200GB Firmware version 9.1.0u.6619_B20230130
- Totolink LR1200GB Hardware Device
- Totolink Lr1200gb Firmware
Discovery Timeline
- 2024-01-16 - CVE-2024-0575 published to NVD
- 2024-11-21 - Last updated in NVD database
Technical Details for CVE-2024-0575
Vulnerability Analysis
This vulnerability is classified as CWE-121 (Stack-based Buffer Overflow), a memory corruption flaw that occurs when a program writes more data to a stack-allocated buffer than it was designed to hold. In the context of the Totolink LR1200GB router, the vulnerable setTracerouteCfg function fails to properly validate the length of user-supplied input through the command argument before copying it to a fixed-size buffer on the stack.
The vulnerability is particularly dangerous because it is accessible through the device's CGI interface at /cgi-bin/cstecgi.cgi, which is typically exposed on the network interface of the router. Since no authentication is required to exploit this flaw, any attacker with network access to the device's management interface can trigger the buffer overflow remotely.
Root Cause
The root cause of CVE-2024-0575 lies in the setTracerouteCfg function's failure to implement proper bounds checking when processing the command argument. When this function receives user-controlled input through the CGI interface, it copies the data into a stack buffer without verifying that the input length does not exceed the buffer's allocated size. This allows an attacker to supply an oversized payload that overwrites adjacent memory on the stack, including the function's return address.
Stack-based buffer overflows in embedded devices like routers are particularly severe because these devices often lack modern exploit mitigations such as ASLR (Address Space Layout Randomization), stack canaries, or DEP/NX (Data Execution Prevention). This makes exploitation significantly more reliable and straightforward.
Attack Vector
The attack vector for this vulnerability is network-based. An attacker can craft a malicious HTTP request to the /cgi-bin/cstecgi.cgi endpoint, specifically targeting the setTracerouteCfg function with an oversized command parameter. The attack requires:
- Network access to the router's management interface (typically on the LAN side, but potentially exposed on WAN if misconfigured)
- A crafted HTTP POST request with a malicious payload in the command argument
- The payload overflows the stack buffer, overwriting the return address
- Upon function return, execution jumps to attacker-controlled code
The exploit has been publicly disclosed and documented in security databases. Additional technical details can be found in the GitHub PoC Repository and the associated VulDB entry #250791.
Detection Methods for CVE-2024-0575
Indicators of Compromise
- Unusual or repeated HTTP POST requests to /cgi-bin/cstecgi.cgi containing abnormally long command parameters
- Unexpected router reboots or crashes, which may indicate exploitation attempts causing denial of service
- Unauthorized configuration changes or new administrative accounts on the device
- Anomalous outbound traffic from the router to unknown external IP addresses
- Evidence of shellcode execution or unauthorized processes running on the device
Detection Strategies
- Implement network intrusion detection rules to identify HTTP requests with oversized parameters targeting /cgi-bin/cstecgi.cgi
- Monitor router logs for repeated authentication failures or unusual CGI access patterns
- Deploy SentinelOne Singularity for IoT to detect exploitation attempts and anomalous device behavior
- Use firmware integrity monitoring to detect unauthorized modifications to device software
Monitoring Recommendations
- Enable logging on the router's management interface and forward logs to a centralized SIEM for analysis
- Configure alerts for any external access attempts to the router's CGI endpoints
- Regularly review network traffic patterns for signs of command-and-control communication originating from network devices
- Implement network segmentation to limit exposure of router management interfaces
How to Mitigate CVE-2024-0575
Immediate Actions Required
- Restrict access to the router's management interface by enabling firewall rules that only allow trusted IP addresses
- Disable remote management capabilities if not required for operations
- Place the router's management interface on an isolated management VLAN
- Monitor for updated firmware from Totolink that addresses this vulnerability
- Consider replacing the affected device with a more secure alternative if no patch is available
Patch Information
As of the last available information, Totolink has not released a security patch addressing this vulnerability. The vendor was contacted during the responsible disclosure process but did not respond. Organizations using affected devices should monitor Totolink's official channels for firmware updates and implement the recommended workarounds until a patch becomes available.
Workarounds
- Implement strict firewall rules to block external access to the /cgi-bin/cstecgi.cgi endpoint
- Use a Web Application Firewall (WAF) or reverse proxy to filter and validate input to CGI endpoints
- Disable the traceroute configuration feature if it is not essential to operations
- Consider deploying a network-level IPS to detect and block exploitation attempts targeting this vulnerability
- Evaluate replacing the vulnerable device with hardware from vendors with better security patch practices
# Example firewall rule to restrict management interface access (iptables)
# Block external access to CGI interface
iptables -A INPUT -i eth0 -p tcp --dport 80 -d <router_ip> -j DROP
iptables -A INPUT -i eth0 -p tcp --dport 443 -d <router_ip> -j DROP
# Allow only trusted management network
iptables -A INPUT -s 192.168.1.0/24 -p tcp --dport 80 -d <router_ip> -j ACCEPT
iptables -A INPUT -s 192.168.1.0/24 -p tcp --dport 443 -d <router_ip> -j ACCEPT
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

