Detect D-Link DIR-600L HNAP Handler Stack Buffer Overflow (CVE-2026-129354) in Sumo Logic CSE
Detects exploitation attempts against the HNAP handler (hnap_main in htdocs/cgibin) of D-Link DIR-600L 2.17b02. A stack-based buffer overflow (CWE-119/CWE-121) is reachable via the HNAP interface by supplying an oversized or malformed SOAPAction header. NVD lists this as remotely exploitable with a published exploit (CVSS 9.3). The advisory that documents the flaw confirms crashes and memory corruption in an emulated test environment but does not demonstrate arbitrary code execution on a physical device, and notes the CVE is not yet confirmed. Detection focuses on HTTP requests to the HNAP endpoint carrying anomalous SOAPAction headers, oversized POST bodies, and post-exploitation indicators from the embedded device.
MITRE ATT&CK
- Tactic
- Initial Access Execution
Sumo Detection Query
// df00tech DF00-5f87aeb292 · https://df00tech.com/detections/CVE-2026-129354 · licence: https://df00tech.com/detections/licence
_sourceCategory=*firewall* OR _sourceCategory=*proxy* OR _sourceCategory=*web*
| parse regex "(?<method>GET|POST|PUT) (?<uri>\S+)" nodrop
| parse field=_raw "SOAPAction: \"*\"" as soapaction nodrop
| where (uri matches "*/HNAP1*" or uri matches "*HNAP*" or uri matches "*cgibin*") and method = "POST"
| parse regex "Content-Length: (?<body_len>\d+)" nodrop
| where (num(body_len) > 1000) or (length(soapaction) > 256) or (soapaction matches "*../*") or (soapaction matches "*$(*") or (soapaction matches "*;*") or (soapaction matches "*|*")
| fields _messageTime, src_ip, dest_ip, uri, method, soapaction, body_len Sumo Logic search surfacing POST requests to the D-Link HNAP handler with oversized bodies or malformed SOAPAction headers.
Data Sources
Required Tables
False Positives & Tuning
- Valid mydlink/mobile-app HNAP sessions with long SOAPAction values
- Authorized penetration testing of the HNAP interface
- Payload re-encoding by intermediary devices affecting Content-Length
Other platforms for CVE-2026-129354
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.
- Test 1 Oversized SOAPAction header to HNAP endpoint
Expected signal: Firewall/proxy/web logs record a POST to /HNAP1/ with a SOAPAction header length far exceeding normal values.
- Test 2 Oversized POST body to cgibin HNAP handler
Expected signal: Web/proxy logs show a POST to the HNAP endpoint with a request body exceeding 1000 bytes.
- Test 3 SOAPAction header with injection metacharacters
Expected signal: Logs capture a POST to /HNAP1/ with a SOAPAction header containing ';', '|', and '../' sequences.
Response Playbook
Triage
- Confirm the destination IP is a D-Link DIR-600L (firmware 2.17b02) or other HNAP-capable D-Link router exposed to the source network, and verify whether its web/HNAP interface is reachable from untrusted zones.
- Inspect the full HTTP request: capture the SOAPAction header value and POST body, measure their lengths, and look for non-printable bytes, long byte runs, or shellcode/ROP-like patterns consistent with a stack overflow.
- Determine whether the source IP is a known scanner, threat-intel-flagged host, or previously unseen, and check for repeated or burst requests to /HNAP1/ from the same source.
- Review device logs (if syslog is forwarded) for crashes, httpd/cgibin restarts, or watchdog reboots timed to the suspicious request.
Containment
- Block the source IP at the perimeter firewall and restrict access to the router's HNAP/web management interface to trusted management VLANs only.
- Isolate the affected router from the WAN/untrusted segment and disable remote (WAN-side) management and the HNAP service if not required.
- If compromise is suspected, take the device offline and prepare for firmware re-flash, since embedded compromise can persist across reboots.
Evidence Collection
- Preserve full packet captures / proxy logs of the offending requests including raw SOAPAction headers and POST bodies.
- Export firewall, WAF, and web-proxy logs showing the source, timing, and frequency of HNAP requests for the incident timeline.
- If accessible, capture the router's running configuration, process list, and any available crash/core dumps before power-cycling.
Escalation Criteria
- !Escalate to incident response if post-exploitation indicators appear (unexpected outbound connections from the router, DNS/config changes, new admin accounts, or firmware tampering).
- !Escalate if the same exploitation pattern targets multiple routers or causes repeated crashes/reboots, indicating active mass exploitation.
- !Escalate to network/device owners for emergency firmware update or decommissioning given the end-of-life status of DIR-600L and the published exploit.
Investigation Guide
Forensic Artifacts
- >
Web/HNAP access logs on the device or upstream proxy showing POST requests to /HNAP1/ with oversized SOAPAction headers - >
httpd/cgibin process crash or restart entries and watchdog-triggered reboot records in device syslog - >
Unexpected modifications to NVRAM/config, new firewall rules, or added credentials on the router - >
Anomalous outbound connections from the router's IP to attacker infrastructure
Tuning Guidance
Baseline normal SOAPAction length and POST body size for legitimate HNAP/mydlink management traffic in your environment, then raise the length thresholds to just above that baseline to cut noise. Whitelist known management source IPs (mydlink cloud ranges, admin workstations) and authorized scanner IPs. If you only ingest firewall metadata without header/body visibility, rely on the path + method + frequency signals and consider deploying packet capture at the router segment for full fidelity.
Hunting Queries
Hunts for bursts of oversized HNAP POST requests across routers to find scanning/exploitation campaigns and identify impacted devices.
// df00tech DF00-5f87aeb292 · https://df00tech.com/detections/CVE-2026-129354 · licence: https://df00tech.com/detections/licence
CommonSecurityLog | where RequestURL has "HNAP" and RequestMethod == "POST" | extend sa = tostring(parse_json(AdditionalExtensions).SOAPAction) | where strlen(sa) > 200 or strlen(RequestContext) > 1000 | summarize count(), make_set(SourceIP) by bin(TimeGenerated, 1h), DestinationIP ``` df00tech DF00-5f87aeb292 · https://df00tech.com/detections/CVE-2026-129354 · licence: https://df00tech.com/detections/licence ```
index=proxy OR index=firewall uri="*HNAP*" http_method=POST | eval sa_len=len(coalesce(SOAPAction,soapaction)) | where sa_len>200 OR coalesce(bytes_in,content_length,0)>1000 | stats count values(src_ip) as sources by dest_ip, date_hour Atomic Red Team Tests
Sends a POST request to the HNAP endpoint with an abnormally long SOAPAction header to simulate the buffer overflow trigger against hnap_main.
Command
curl -s -X POST "http://ROUTER_IP/HNAP1/" -H "SOAPAction: http://purenetworks.com/HNAP1/$(python3 -c 'print("A"*2048)')" -H "Content-Type: text/xml" --data '<?xml version="1.0"?><soap:Envelope><soap:Body></soap:Body></soap:Envelope>' --max-time 10 || true Cleanup
echo 'No persistent changes made by this test; no cleanup required' Expected Telemetry
Firewall/proxy/web logs record a POST to /HNAP1/ with a SOAPAction header length far exceeding normal values.
Expected Detection
All seven SIEM queries fire on the oversized SOAPAction header.
Submits a large POST body to the cgibin HNAP handler to exercise the oversized-body detection path.
Command
curl -s -X POST "http://ROUTER_IP/HNAP1/" -H "Content-Type: text/xml" --data "$(python3 -c 'print("A"*4096)')" --max-time 10 || true Cleanup
echo 'No cleanup required; request-only test' Expected Telemetry
Web/proxy logs show a POST to the HNAP endpoint with a request body exceeding 1000 bytes.
Expected Detection
SIEM queries flag the request based on body length > 1000 bytes.
Sends a POST to the HNAP endpoint with shell/path metacharacters in the SOAPAction header to validate the metacharacter detection branch.
Command
curl -s -X POST "http://ROUTER_IP/HNAP1/" -H 'SOAPAction: http://purenetworks.com/HNAP1/GetDeviceSettings;$(id)|../../' -H "Content-Type: text/xml" --data '<?xml version="1.0"?><soap:Envelope><soap:Body></soap:Body></soap:Envelope>' --max-time 10 || true Cleanup
echo 'Request-only test; no cleanup required' Expected Telemetry
Logs capture a POST to /HNAP1/ with a SOAPAction header containing ';', '|', and '../' sequences.
Expected Detection
SIEM queries match on SOAPAction metacharacter patterns.