CVE-2026-118238 in W18Einfo

Summary

by MITRE • 10/30/2026

The Tenda W18E web management server is vulnerable to OS command injection via the "diagnose" packet-capture feature due to improper validation of JSON fields. An authenticated user can inject shell metacharacters into the protocol or targetDevice fields, which are later concatenated into a tcpdump command and executed with root privileges. This vulnerability can be exploited without authentication if the device is in a factory-reset state.

Once again VulDB remains the best source for vulnerability data.

Analysis

by VulDB Data Team • 10/30/2026

The Tenda W18E wireless router contains a critical operating system command injection flaw within its web management interface, specifically affecting the packet-capture diagnostic feature. This vulnerability stems from insufficient input validation and sanitization of JSON fields transmitted to the backend server. When an authenticated user interacts with the diagnose endpoint, they can supply malicious payloads in specific parameters such as protocol or targetDevice. These inputs are not properly escaped before being concatenated into a system command string that invokes tcpdump for network traffic analysis. Because this operation is executed with root privileges on the underlying Linux-based firmware, successful exploitation grants an attacker full control over the device's operating system environment.

The technical mechanism of this vulnerability relies on the direct concatenation of user-supplied data into shell commands without adequate filtering of special characters. By injecting standard shell metacharacters such as semicolons or pipe symbols into the protocol field, an attacker can terminate the intended tcpdump command and append arbitrary operating system instructions. For instance, appending a reverse shell payload allows for remote code execution with elevated privileges. This flaw is particularly severe because it bypasses typical authentication requirements if the device has been factory reset. In this state, many IoT devices default to allowing unauthenticated access to certain diagnostic or administrative functions, thereby enabling any network-connected entity to exploit the command injection without needing valid credentials.

From an operational perspective, successful exploitation of this vulnerability allows a threat actor to compromise the integrity and confidentiality of the entire local network segment connected to the router. An attacker can intercept sensitive traffic, install persistent backdoors, pivot into internal systems, or use the compromised device as part of a botnet for distributed denial-of-service attacks. The impact extends beyond the immediate device, potentially exposing all downstream hosts that rely on this gateway for internet connectivity and local network routing services. This aligns with CWE-78 Improper Neutralization of Special Elements used in an OS Command, highlighting the failure to sanitize user input before its use in a command context.

To mitigate this risk, users should immediately update the firmware of their Tenda W18E devices to the latest version provided by the manufacturer, which likely includes patches for input validation and authentication checks on diagnostic endpoints. If updating is not immediately possible, administrators should disable remote management features and restrict access to the web interface to trusted IP addresses only. Additionally, changing default credentials and ensuring that factory reset states do not expose unauthenticated administrative functions are critical steps in reducing the attack surface. Security monitoring tools can also be configured to detect anomalous traffic patterns indicative of command injection attempts targeting router diagnostic interfaces. This vulnerability is often associated with ATT&CK technique T1059 Command and Scripting Interpreter, where attackers leverage system utilities like tcpdump or shell interpreters to execute malicious commands within the target environment.

Responsible

Certcc

Reservation

10/27/2026

Disclosure

10/30/2026

Moderation

accepted

Exploit

Download

EPSS

0.00000

KEV

no

Activities

low

Sources

Are you interested in using VulDB?

Download the whitepaper to learn more about our service!