Skip to content
CVE-2026-129351 Splunk · SPL

Detect TRENDnet TEW-657BRM /setup.cgi sprintf Buffer Overflow (CVE-2026-129351) in Splunk

Detects exploitation attempts against an out-of-bounds write in the sprintf() handling of /setup.cgi in the mini_httpd component of TRENDnet TEW-657BRM 1.00.1 routers (CVE-2026-129351, CVSS 9.3, CWE-119/CWE-787). An unauthenticated remote attacker can send an oversized parameter to /setup.cgi, overflowing a fixed-size buffer via an unbounded sprintf call, leading to memory corruption and potential remote code execution on the device. Because this is an embedded SOHO router, detection relies primarily on network-boundary telemetry (web proxy, WAF, firewall, NGFW/IDS) observing HTTP requests to /setup.cgi with abnormally long query parameters or request bodies, as the device itself exposes little host logging. A public exploit has been disclosed; detection favors recall on anomalous request shape.

MITRE ATT&CK

Tactic
Initial Access Lateral Movement

SPL Detection Query

Splunk (SPL)
spl
``` df00tech DF00-af56b2a326 · https://df00tech.com/detections/CVE-2026-129351 · licence: https://df00tech.com/detections/licence ```
(index=proxy OR index=network OR sourcetype="cisco:asa" OR sourcetype="pan:traffic" OR sourcetype="iis")
 uri_path="/setup.cgi" OR uri="*/setup.cgi*"
| eval full_url=coalesce(url, uri, request)
| eval url_len=len(full_url)
| eval qs_len=len(coalesce(uri_query, query))
| where url_len>512 OR qs_len>512
| stats count min(_time) as firstSeen max(_time) as lastSeen values(full_url) as sampleUrls by src_ip dest_ip dest_port sourcetype
| where count>0
| sort - count
critical severity medium confidence

Searches proxy, firewall and IIS reverse-proxy sourcetypes for /setup.cgi requests whose URL or query string exceeds 512 bytes, indicating an attempted sprintf buffer overflow against the TRENDnet router.

Data Sources

Web ProxyNetwork FirewallNGFWIIS/Reverse Proxy Logs

Required Sourcetypes

pan:trafficcisco:asaiisstream:http

False Positives & Tuning

  • Router configuration pushes that legitimately include large form payloads
  • Vulnerability scanners and fuzzers generating oversized parameters
  • Monitoring or provisioning scripts embedding long encoded values in requests to /setup.cgi

Other platforms for CVE-2026-129351


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 Oversized /setup.cgi query string against lab router

    Expected signal: Proxy/firewall/WAF log entry showing a GET to /setup.cgi with a query string longer than 512 bytes.

  2. Test 2 Oversized /setup.cgi POST body

    Expected signal: Network capture / proxy log showing a POST to /setup.cgi with body length > 1024 bytes.

  3. Test 3 Repeated offset-brute-force probing

    Expected signal: Series of proxy/firewall events to /setup.cgi with progressively larger query lengths from one source IP.


Response Playbook

Triage

  1. Confirm the destination IP is a TRENDnet TEW-657BRM (or similar mini_httpd-based) router exposing /setup.cgi, and determine whether its management interface is reachable from the source network or the internet.
  2. Extract the full offending request (URL, query string, body) and measure the oversized parameter; look for shellcode patterns, NOP sleds, or repeated padding bytes consistent with a buffer overflow attempt.
  3. Determine whether the source IP is internal, a known scanner, or an external attacker, and check for repeated or iterative attempts suggesting offset brute-forcing of the overflow.
  4. Correlate the request timing with any loss of device availability, reboot, or configuration change on the router.

Containment

  1. Block the source IP at the perimeter firewall and restrict access to the router's /setup.cgi management interface to trusted management subnets only.
  2. Disable WAN-side management on the affected router and, if compromise is suspected, isolate the device from the network pending inspection.
  3. Apply vendor firmware updates if available; if none exist, consider replacing the end-of-life device or placing it behind a filtering proxy that strips oversized /setup.cgi parameters.

Evidence Collection

  1. Preserve full packet captures or proxy/WAF logs of the oversized /setup.cgi request(s) including headers and body.
  2. Capture the router's current configuration and, if accessible, its system/crash logs or memory state for forensic analysis of memory corruption.
  3. Record firewall and flow data showing the source/destination pairs and timeline of the exploitation attempts.

Escalation Criteria

  • !Escalate to incident response if the router becomes unresponsive, reboots, or shows unexpected configuration changes following the oversized request.
  • !Escalate if the same source IP successfully reaches the device and subsequently pivots to internal hosts, or if outbound C2-like traffic originates from the router.
  • !Escalate if exploitation attempts target multiple internet-facing devices, indicating a campaign rather than isolated probing.

Investigation Guide

Forensic Artifacts

  • >Proxy/WAF/firewall logs recording oversized /setup.cgi GET or POST requests
  • >Router crash logs, watchdog reboots, or corrupted NVRAM configuration entries
  • >Full packet captures containing the overflow payload directed at the mini_httpd service

Tuning Guidance

Tune the length threshold (default 512 bytes) to the longest legitimate /setup.cgi request observed from genuine router administration in your environment; raise it if config-save operations are noisy, lower it if the device is not normally managed over the monitored path. Allowlist known vulnerability scanners and trusted management hosts by source IP. Because this is an embedded device with minimal host logging, prioritize network-boundary sources (proxy, WAF, NGFW, packet capture) and ensure HTTP URL/body fields are fully logged rather than truncated.


Hunting Queries

Surfaces source/destination pairs sending abnormally long /setup.cgi requests over time, useful for spotting offset brute-forcing below the primary alert threshold.

Hunting — KQL
kql
// df00tech DF00-af56b2a326 · https://df00tech.com/detections/CVE-2026-129351 · licence: https://df00tech.com/detections/licence
CommonSecurityLog | where RequestURL has "/setup.cgi" | extend L = strlen(RequestURL) | summarize max(L), count() by SourceIP, DestinationIP | where max_L > 400
Hunting — SPL
spl
``` df00tech DF00-af56b2a326 · https://df00tech.com/detections/CVE-2026-129351 · licence: https://df00tech.com/detections/licence ```
index=proxy uri="*/setup.cgi*" | eval l=len(url) | stats max(l) as maxlen count by src_ip dest_ip | where maxlen>400

Atomic Red Team Tests

Test 1 Oversized /setup.cgi query string against lab router
linux

Sends a GET request to /setup.cgi with an oversized query parameter to simulate the sprintf overflow trigger in a lab.

Command

bash
curl -s -o /dev/null -w '%{http_code}\n' "http://192.0.2.10/setup.cgi?page=$(python3 -c 'print("A"*2000)')"

Cleanup

bash
echo 'No cleanup required; request is stateless'

Expected Telemetry

Proxy/firewall/WAF log entry showing a GET to /setup.cgi with a query string longer than 512 bytes.

Expected Detection

Detection fires on the oversized /setup.cgi URL length exceeding the configured threshold.

Test 2 Oversized /setup.cgi POST body
linux

Submits a POST request with a large body targeting /setup.cgi to simulate overflow via form data.

Command

bash
python3 -c "import urllib.request; urllib.request.urlopen('http://192.0.2.10/setup.cgi', data=('field='+'B'*3000).encode())" || true

Cleanup

bash
echo 'No cleanup required'

Expected Telemetry

Network capture / proxy log showing a POST to /setup.cgi with body length > 1024 bytes.

Expected Detection

Detection matches the oversized request body / URL rule for /setup.cgi.

Test 3 Repeated offset-brute-force probing
linux

Sends multiple /setup.cgi requests with incrementally longer parameters to emulate overflow offset tuning.

Command

bash
for n in 600 900 1200 1500; do curl -s -o /dev/null "http://192.0.2.10/setup.cgi?p=$(python3 -c "print('C'*$n)")"; done

Cleanup

bash
echo 'No cleanup required'

Expected Telemetry

Series of proxy/firewall events to /setup.cgi with progressively larger query lengths from one source IP.

Expected Detection

Hunting query surfaces the source IP as sending repeated abnormally long /setup.cgi requests.

Related Detections