Skip to content
CVE-2026-138227 IBM QRadar · QRadar

Detect D-Link R95 DHMAPI SetTimeSettings OS Command Injection (CVE-2026-138227) in IBM QRadar

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.

MITRE ATT&CK

Tactic
Initial Access Execution

QRadar Detection Query

IBM QRadar (QRadar)
sql
-- df00tech DF00-a6f1c03af9 · https://df00tech.com/detections/CVE-2026-138227 · licence: https://df00tech.com/detections/licence
SELECT sourceip, destinationip, "URL", "User Agent", QIDNAME(qid) AS event FROM events WHERE ("URL" ILIKE '%SetTimeSettings%' OR "URL" ILIKE '%DHMAPI%') AND ("URL" IMATCHES '.*([;|&`]|\$\(|%0[ad]|wget |curl |busybox|tftp|/bin/sh).*') ORDER BY startTime DESC LAST 24 HOURS
critical severity medium confidence

Selects HTTP events to the D-Link R95 DHMAPI SetTimeSettings endpoint containing shell metacharacters or remote-download commands.

Data Sources

Proxy flow logsFirewall eventsRouter syslog

Required Tables

events

False Positives & Tuning

  • Benign configuration traffic
  • Automated scanning
  • Admin testing

Other platforms 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.

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

  2. Test 2 Simulated download-and-execute injection via DHMAPI

    Expected signal: HTTP log entry containing SetTimeSettings and 'wget' in the query string.

  3. Test 3 Benign time configuration control request

    Expected signal: HTTP log entry to SetTimeSettings with clean parameters.


Response Playbook

Triage

  1. 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.
  2. 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).
  3. 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.
  4. Correlate the source IP against threat intelligence and check for the same injection pattern hitting other D-Link devices in the environment.

Containment

  1. 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).
  2. 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.
  3. Rotate any credentials, Wi-Fi PSKs, and management secrets stored on or reachable through the compromised device.

Evidence Collection

  1. Capture full HTTP request/response pairs (proxy, firewall, and device syslog) for the SetTimeSettings/DHMAPI requests including source IP, timestamps and payloads.
  2. Where possible, acquire the router configuration, running process list, and any dropped files (downloaded via wget/tftp) from the device for forensic analysis.
  3. 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.

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

Test 1 Simulated DHMAPI SetTimeSettings command injection via metacharacter payload
linux

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

bash
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

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

Test 2 Simulated download-and-execute injection via DHMAPI
linux

Sends a crafted request attempting to inject a wget download command into a time parameter to validate detection of download tooling.

Command

bash
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

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

Test 3 Benign time configuration control request
linux

Sends a legitimate SetTimeSettings request without metacharacters to confirm the detection does not alert on normal configuration (true-negative control).

Command

bash
curl -s -X POST 'http://192.168.0.1/SetTimeSettings' -d 'NTPServer=pool.ntp.org&timezone=UTC'

Cleanup

bash
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