CVE-2026-138670 — Totolink X6000R — CWE-287 · CWE-288
A weakness has been identified in TOTOLINK X6000R up to 9.4.0cu.1458_B20250708. The impacted element is the function setStaticDhcpRules/arp_bind of the file /usr/sbin/shttpd. Executing a manipulation of the argument ip can lead to authentication bypass using alternate channel. The attack can be launched remotely.
A weakness has been identified in TOTOLINK X6000R up to 9.4.0cu.1458_B20250708. The impacted element is the function setStaticDhcpRules/arp_bind of the file /usr/sbin/shttpd. Executing a manipulation of the argument ip can lead to authentication bypass using alternate channel. The attack can be launched remotely.
🎯 What is this vulnerability?
This vulnerability is a Critical Authentication Bypass via Alternate Channel (CWE-287, CWE-288) in the TOTOLINK X6000R router firmware (versions up to 9.4.0cu.1458_B20250708).
Technical Flaw Analysis:
The core issue resides in the shttpd daemon (/usr/sbin/shttpd), which handles the router's web management interface. Specifically, the function setStaticDhcpRules (or its associated handler arp_bind) fails to enforce proper authentication checks before processing the ip argument.
1. Missing Authorization Check: The endpoint handling setStaticDhcpRules does not verify the session token or credentials of the requesting user. In many embedded Linux web servers (like shttpd), authentication is often handled by a middleware layer or a specific cookie check. If the code path for setStaticDhcpRules bypasses this check (e.g., by being routed before the auth filter or by a logic error in the auth verification function), an unauthenticated attacker can invoke this function.
2. Input Manipulation: The ip argument is not properly sanitized. While the primary impact is authentication bypass, the manipulation of ip likely allows the attacker to inject commands or set up ARP bindings that facilitate further exploitation. The "alternate channel" aspect suggests that the attacker can establish a privileged session or execute actions typically reserved for the admin user without providing valid credentials.
3. CWE-287 (Improper Authentication) & CWE-288 (Improper Session Management): The combination indicates that the system fails to verify the identity of the user and/or fails to properly manage the session state, allowing an attacker to impersonate an authenticated user or bypass the login requirement entirely.
CVSS Vector Interpretation:
- AV:N/AC:L/PR:N/UI:N: The attack is network-based, requires low complexity, no privileges, and no user interaction. This confirms a remote, unauthenticated exploit.
- C:H/I:H/A:H: The impact is critical across all three dimensions. The attacker can read sensitive data (C:H), modify system configuration or inject malicious code (I:H), and potentially crash the router or lock out legitimate users (A:H).
- Fingerprinting: The attacker checks the
Serverheader or the login page HTML for TOTOLINK branding. - Version Check: The attacker attempts to retrieve the firmware version via common endpoints like
/cgi-bin/GetVersionor by inspecting theX-Device-Modelheader. If the version is9.4.0cu.1458_B20250708or earlier, the device is vulnerable.
⚡ Attack Chain
1. Discovery & Reconnaissance
The attacker scans the target network for open port 80 or 443 (HTTP/HTTPS) and identifies the device as a TOTOLINK X6000R.2. Exploitation
The attacker sends a crafted HTTP request to the vulnerable endpoint. Note: The exact URI path forsetStaticDhcpRules is not explicitly provided in the CVE description. The following is an illustrative example based on common TOTOLINK shttpd conventions.Hypothesized Endpoint: /cgi-bin/setStaticDhcpRules or /api/setStaticDhcpRules
Vulnerable Parameter: ip
PoC (Illustrative):
# Illustrative PoC - Adjust URI and parameters based on actual firmware analysis
curl -X POST "http://<TARGET_IP>/cgi-bin/setStaticDhcpRules" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "ip=127.0.0.1;id;whoami" \
-vMechanics:
1. The request is sent without any Cookie or Authorization header.
2. The shttpd daemon routes the request to the setStaticDhcpRules function.
3. Due to the missing authentication check, the function executes.
4. The ip parameter is processed. If the backend uses a shell command to update ARP bindings (e.g., arp -s <ip> <mac>), the semicolon (;) allows command injection.
5. Even if command injection is not possible, the successful execution of the function may return a session token or set a flag that grants the attacker administrative privileges in subsequent requests (Authentication Bypass).
Alternative Exploitation (Pure Auth Bypass):
If the vulnerability is purely an authentication bypass (without immediate RCE), the attacker might use the response from the vulnerable call to obtain a valid session cookie:
# Illustrative - If the response contains a session token
curl -X POST "http://<TARGET_IP>/cgi-bin/setStaticDhcpRules" \
-d "ip=192.168.1.100" \
-c cookies.txt
# Then use the cookie to access admin pages
curl -b cookies.txt "http://<TARGET_IP>/admin/index.html"3. Post-Exploitation
Once the attacker has bypassed authentication or achieved command injection: 1. RCE: If command injection is possible, the attacker can execute arbitrary shell commands. 2. Privilege Escalation: Theshttpd process likely runs as root or a high-privilege user. The attacker can read /etc/shadow, modify firewall rules, or install a backdoor.
3. Webshell: The attacker can write a PHP or CGI script to the web root (e.g., /www/ or /htdocs/) for persistent access.
4. Data Exfiltration: The attacker can read sensitive configuration files, Wi-Fi passwords, and user data.
5. Network Compromise: The attacker can modify DNS settings, ARP tables, or firewall rules to intercept traffic or launch attacks on other devices in the network.🌍 Real World Impact
Practical Consequences:
🛡️ Remediation & Mitigation
Exact Affected Versions
9.4.0cu.1458_B20250708.Actionable Workarounds
1. Disable Web Interface: If the router's web interface is not required, disable it in the configuration (if accessible via console or serial). 2. Network Segmentation: Isolate the router's management interface from untrusted networks. Use a separate VLAN for management traffic. 3. WAF/ModSecurity Rules: - Block requests to/cgi-bin/setStaticDhcpRules from unauthenticated users.
- Detect and block command injection patterns in the ip parameter (e.g., ;, |, &, $()).# ModSecurity Rule (Illustrative)
SecRule REQUEST_URI "@rx /cgi-bin/setStaticDhcpRules" \
"id:100001,phase:1,deny,log,msg:'Blocked access to vulnerable endpoint',severity:2"
SecRule ARGS:ip "@rx [;&|$]" \
"id:100002,phase:2,deny,log,msg:'Command injection attempt in ip parameter',severity:2"4. Access Restrictions: Use firewall rules to restrict access to the router's web interface (port 80/443) to trusted IP addresses only.
Detection
/cgi-bin/setStaticDhcpRules or similar endpoints without a valid session cookie.id, whoami, or uname appearing in web server logs or system logs.
- New files created in the web root directory.
- Unexpected changes to ARP tables or firewall rules.⚠️ Urgency
FOFA Query