Skip to main content
CVE Vulnerability Database

CVE-2024-1000: Totolink N200RE Buffer Overflow Flaw

CVE-2024-1000 is a critical stack-based buffer overflow vulnerability in Totolink N200RE Firmware affecting the setTracerouteCfg function. This article covers technical details, affected versions, impact, and mitigation.

Published:

CVE-2024-1000 Overview

CVE-2024-1000 is a stack-based buffer overflow affecting the Totolink N200RE router running firmware version 9.3.5u.6139_B20201216. The flaw resides in the setTracerouteCfg function within /cgi-bin/cstecgi.cgi, where manipulation of the command argument corrupts the stack. An attacker with low privileges on the network can exploit this remotely without user interaction. Public disclosure of the exploit details raises the likelihood of opportunistic attacks against exposed devices. The vulnerability maps to [CWE-121] (Stack-based Buffer Overflow) and [CWE-787] (Out-of-bounds Write). The vendor was contacted but did not respond before disclosure.

Critical Impact

Remote authenticated attackers can trigger memory corruption in the router's CGI handler, enabling potential code execution and full compromise of the device.

Affected Products

  • Totolink N200RE hardware router
  • Totolink N200RE firmware 9.3.5u.6139_B20201216
  • Deployments exposing the /cgi-bin/cstecgi.cgi interface

Discovery Timeline

  • 2024-01-29 - CVE-2024-1000 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-1000

Vulnerability Analysis

The vulnerability lives in the setTracerouteCfg handler exposed through the CGI binary /cgi-bin/cstecgi.cgi. The handler processes the command parameter supplied through HTTP requests without enforcing bounds checks against the destination stack buffer. Supplying an overly long value overwrites adjacent stack memory, including saved return addresses and function pointers.

Because the CGI process typically runs with elevated privileges on embedded devices, successful memory corruption can grant an attacker full control over the router. Consequences include persistent firmware modification, traffic interception, credential theft, and pivoting into internal network segments. The disclosure entry VulDB #252269 tracks the flaw, and technical write-up details are available at the Jylsec advisory.

Root Cause

The root cause is missing input length validation on the command argument before it is copied into a fixed-size stack buffer inside setTracerouteCfg. The function relies on unsafe string operations that continue writing beyond buffer boundaries, aligning with the [CWE-121] and [CWE-787] weakness patterns.

Attack Vector

An attacker sends a crafted HTTP POST request to /cgi-bin/cstecgi.cgi targeting the setTracerouteCfg action with an oversized command value. Low-privilege authenticated access to the web interface is required, but the request is network-reachable and requires no user interaction. Once the stack is corrupted, the attacker can redirect execution flow to attacker-supplied shellcode staged in the request payload.

The vulnerability manifests when the CGI handler processes the command parameter. See the Jylsec technical write-up for the disassembly-level details of the vulnerable code path.

Detection Methods for CVE-2024-1000

Indicators of Compromise

  • HTTP requests to /cgi-bin/cstecgi.cgi containing the setTracerouteCfg topicurl and abnormally long command values
  • Unexpected reboots, service crashes, or configuration resets on Totolink N200RE devices
  • Outbound connections from the router to unfamiliar external hosts following crafted CGI requests
  • New or altered administrative accounts and firmware images that do not match vendor hashes

Detection Strategies

  • Inspect web server and reverse-proxy logs for POST bodies to cstecgi.cgi exceeding expected argument lengths
  • Deploy network intrusion detection signatures that flag oversized command parameters targeting the traceroute configuration endpoint
  • Correlate router management-plane traffic with source IPs outside the administrator baseline

Monitoring Recommendations

  • Forward router syslog and management-interface access logs to a centralized SIEM for retention and query
  • Alert on repeated 5xx responses from the CGI endpoint that may indicate crash-based exploitation attempts
  • Monitor for firmware version drift and unauthorized configuration changes on all Totolink devices

How to Mitigate CVE-2024-1000

Immediate Actions Required

  • Restrict administrative access to the router web interface to trusted management VLANs only
  • Block WAN-side access to /cgi-bin/cstecgi.cgi at the perimeter firewall
  • Rotate administrative credentials on all affected Totolink N200RE devices
  • Inventory network assets to identify any remaining N200RE units running firmware 9.3.5u.6139_B20201216

Patch Information

No vendor patch is available. The vendor was contacted about this disclosure but did not respond, and no fixed firmware version has been published for the affected build. Consult the VulDB entry for the latest status. Organizations should evaluate replacing end-of-support Totolink N200RE hardware with actively maintained devices.

Workarounds

  • Disable remote management on the WAN interface and restrict LAN-side administration to specific hosts
  • Place vulnerable routers behind a segmentation firewall that filters requests to the CGI path
  • Enforce strong, unique administrative passwords to raise the barrier for the authenticated attack prerequisite
  • Decommission and replace the device where feasible, given the absence of a vendor fix
bash
# Example perimeter ACL to block external access to the vulnerable CGI endpoint
iptables -A FORWARD -p tcp --dport 80 -d <router_ip> \
    -m string --string "/cgi-bin/cstecgi.cgi" --algo bm -j DROP
iptables -A FORWARD -p tcp --dport 443 -d <router_ip> \
    -m string --string "/cgi-bin/cstecgi.cgi" --algo bm -j DROP

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.