CVE-2024-0571 Overview
A critical stack-based buffer overflow vulnerability has been discovered in the Totolink LR1200GB router firmware version 9.1.0u.6619_B20230130. This vulnerability exists in the setSmsCfg function within the /cgi-bin/cstecgi.cgi file, where improper handling of the text argument allows an attacker to trigger a stack-based buffer overflow condition. The vulnerability can be exploited remotely without authentication, potentially allowing attackers to execute arbitrary code or crash the affected device.
Critical Impact
Remote attackers can exploit this stack-based buffer overflow to achieve remote code execution or denial of service on vulnerable Totolink LR1200GB routers without requiring authentication.
Affected Products
- Totolink LR1200GB Firmware version 9.1.0u.6619_B20230130
- Totolink LR1200GB Hardware Device
Discovery Timeline
- January 16, 2024 - CVE-2024-0571 published to NVD
- November 21, 2024 - Last updated in NVD database
Technical Details for CVE-2024-0571
Vulnerability Analysis
This vulnerability is classified as CWE-121 (Stack-based Buffer Overflow), a severe memory corruption flaw that occurs when data written to a buffer on the stack exceeds its allocated size. In the context of the Totolink LR1200GB router, the setSmsCfg function fails to properly validate the length of user-supplied input through the text argument before copying it to a fixed-size stack buffer.
The attack surface is particularly concerning because the vulnerable endpoint /cgi-bin/cstecgi.cgi is accessible remotely over the network. An attacker does not need prior authentication or user interaction to exploit this vulnerability. By crafting a malicious HTTP request with an oversized text parameter, an attacker can overflow the stack buffer, potentially overwriting critical control flow data such as return addresses and saved frame pointers.
Successful exploitation could allow attackers to hijack program execution, inject and execute arbitrary code with the privileges of the web server process, or cause the device to crash resulting in denial of service. Given that consumer routers often run with elevated privileges, this could lead to complete device compromise.
Root Cause
The root cause of this vulnerability is insufficient input validation in the setSmsCfg function. The function does not adequately check the length of the text argument before copying it into a stack-allocated buffer. This allows an attacker to supply an excessively long string that overflows the buffer boundaries, corrupting adjacent stack memory including saved return addresses and other critical control data.
Attack Vector
The attack can be initiated remotely over the network by sending a specially crafted HTTP request to the /cgi-bin/cstecgi.cgi endpoint. The attacker manipulates the text argument with a payload designed to overflow the stack buffer. Since no authentication is required and the attack can be launched without any user interaction, the vulnerability presents a significant risk to any internet-exposed Totolink LR1200GB device running the affected firmware version.
The exploitation involves sending an HTTP POST request to the CGI endpoint with a manipulated text parameter containing more data than the buffer can hold. The overflow overwrites stack memory, potentially allowing the attacker to redirect execution flow to attacker-controlled code.
Detection Methods for CVE-2024-0571
Indicators of Compromise
- Abnormal HTTP POST requests to /cgi-bin/cstecgi.cgi with unusually large text parameters
- Router crashes or unexpected reboots following web interface access attempts
- Unusual outbound network connections from the router to unknown IP addresses
- Modifications to router configuration or firmware without administrator action
Detection Strategies
- Monitor and log all HTTP requests to the /cgi-bin/cstecgi.cgi endpoint for anomalously large payloads
- Implement intrusion detection rules to flag requests containing excessive data in the text parameter
- Deploy network-based anomaly detection to identify potential exploitation attempts targeting router management interfaces
Monitoring Recommendations
- Enable logging on the router if supported and regularly review logs for suspicious activity
- Monitor network traffic for unusual patterns originating from or targeting the router's management interface
- Implement network segmentation to isolate IoT and network infrastructure devices from general network traffic
- Consider deploying a web application firewall (WAF) in front of the router management interface if accessible externally
How to Mitigate CVE-2024-0571
Immediate Actions Required
- Restrict access to the router's web management interface to trusted internal networks only
- Disable remote management features if not required for operation
- Implement firewall rules to block external access to port 80/443 on the router
- Monitor for any firmware updates from Totolink that address this vulnerability
Patch Information
At the time of disclosure, the vendor (Totolink) was contacted but did not respond. No official patch is currently available for this vulnerability. Users should monitor the VulDB advisory and the vendor's official channels for any security updates.
For additional technical details, refer to the GitHub vulnerability report.
Workarounds
- Disable remote administration and restrict management interface access to local network only
- Place the router behind a firewall that blocks unauthorized access to management ports
- Consider replacing the affected device with a router from a vendor with better security response practices
- If the device must remain in use, implement strict network ACLs to limit access to the management interface
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.


