Detect D-Link R32 DHMAPI SetDeviceSettings TZLocation OS Command Injection (CVE-2026-136822) in Google Chronicle
Detects exploitation of CVE-2026-136822, an OS command injection vulnerability (CWE-77/CWE-78) in the SetDeviceSettings function of the DHMAPI component in /usr/bin/httpd on D-Link R32 1.10B02 routers. The TZLocation parameter is passed unsanitized into a shell context, allowing an attacker to inject arbitrary operating system commands via the device's HTTP management interface (DHMAPI endpoint). CVSS 8.6. The exploit has been publicly disclosed and may be used. Detection focuses on anomalous HTTP requests to the DHMAPI/SetDeviceSettings handler containing shell metacharacters in the TZLocation field, and on downstream child-process spawning by the httpd process characteristic of embedded command injection.
Based on D-Link R32 A1 1.10B02 SetDeviceSettings TZLocation OS Command Injection
MITRE ATT&CK
- Tactic
- Initial Access Execution
YARA-L Detection Query
// df00tech DF00-825e1aeb48 · https://df00tech.com/detections/CVE-2026-136822 · licence: https://df00tech.com/detections/licence
rule dlink_r32_dhmapi_setdevicesettings_cmdi {
meta:
author = "Argus"
description = "D-Link R32 DHMAPI SetDeviceSettings TZLocation OS command injection (CVE-2026-136822)"
severity = "CRITICAL"
events:
($e.metadata.event_type = "NETWORK_HTTP")
(re.regex($e.network.http.response_code, ".*") or $e.target.url != "")
(re.regex($e.target.url, `(?i)(SetDeviceSettings|DHMAPI)`))
(re.regex($e.target.url, `(?i)TZLocation`))
(re.regex($e.target.url, `(;|\||\x60|\$\(|\$\{|%3[bB]|%7[cC]|%26|%60)`))
$src = $e.principal.ip
match:
$src over 10m
condition:
$e
} Chronicle YARA-L rule detecting HTTP requests to the DHMAPI SetDeviceSettings endpoint where the TZLocation parameter includes shell metacharacters, indicative of CVE-2026-136822 exploitation.
Data Sources
Required Tables
False Positives & Tuning
- Benign timezone strings with special characters
- Security scanning tools
- Configuration automation requests
Other platforms for CVE-2026-136822
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 SetDeviceSettings command injection via TZLocation (semicolon)
Expected signal: Proxy/network log entry for POST to /DHMAPI/SetDeviceSettings containing TZLocation with a semicolon metacharacter
- Test 2 URL-encoded command injection via TZLocation (pipe)
Expected signal: Network log entry showing TZLocation=UTC%7Cwhoami against the DHMAPI endpoint
- Test 3 Command substitution injection via TZLocation
Expected signal: Proxy log entry with TZLocation containing $( command substitution against the DHMAPI endpoint
Response Playbook
Triage
- Confirm the source device is a D-Link R32 running firmware 1.10B02 (or a model sharing the DHMAPI httpd component) exposed to the request source.
- Decode the captured TZLocation value and isolate the injected command fragment after the shell metacharacter (e.g. text following ';', '|', '`', or '$(').
- Determine whether the request succeeded (HTTP 200 and expected DHMAPI response body) versus returning an error, to gauge whether injection likely executed.
- Review whether the source IP is internal management, a known scanner, or an untrusted/WAN-side address, and whether the management interface is internet-exposed.
Containment
- Block the offending source IP at the gateway/firewall and restrict DHMAPI/management interface access to trusted management networks or VPN only.
- Isolate the affected router from the network and disable WAN-side access to the HTTP management interface pending patch or firmware update.
- If compromise is suspected, factory-reset the device after capturing evidence and rotate all device and downstream credentials.
Evidence Collection
- Capture full HTTP request/response pairs (headers and body) for the SetDeviceSettings requests, including the raw TZLocation payload.
- Collect router syslog/httpd logs and, if accessible, the device configuration and any files/processes created after the request timestamp.
- Preserve firewall/proxy flow records showing the source IP, timing, and any subsequent outbound connections from the router.
Escalation Criteria
- !Escalate to incident response if the injected command indicates download-and-execute, reverse shell, or credential/configuration exfiltration.
- !Escalate if the router shows post-exploitation indicators such as unexpected outbound connections, new processes, or altered configuration.
- !Escalate if the management interface is confirmed internet-exposed, since the vulnerability is remotely exploitable and a public exploit exists.
Investigation Guide
Forensic Artifacts
- >
httpd/syslog entries on the device recording SetDeviceSettings requests and spawned child processes - >
Proxy/firewall logs containing the raw TZLocation payload and source IP - >
Any dropped files, cron entries, or new processes on the device created at or after the request timestamp
Tuning Guidance
Baseline which internal management hosts legitimately call the DHMAPI SetDeviceSettings endpoint and allowlist them. Tighten the metacharacter regex if your gateway URL-encodes legitimate timezone separators, and prefer inspecting the decoded TZLocation field alone rather than the full URL to reduce noise from unrelated parameters. If no proxy decrypts/logs device management traffic, deploy host/network capture in front of the router to populate the required fields.
Hunting Queries
Hunts for sources making repeated requests to the DHMAPI SetDeviceSettings endpoint with a TZLocation parameter, which may indicate scanning or brute-forcing of the injection point.
// df00tech DF00-825e1aeb48 · https://df00tech.com/detections/CVE-2026-136822 · licence: https://df00tech.com/detections/licence
CommonSecurityLog | where RequestURL has "DHMAPI" or RequestURL has "SetDeviceSettings" | where RequestURL has "TZLocation" | summarize count() by SourceIP, bin(TimeGenerated, 1h) | where count_ > 5 ``` df00tech DF00-825e1aeb48 · https://df00tech.com/detections/CVE-2026-136822 · licence: https://df00tech.com/detections/licence ```
index=proxy (url="*DHMAPI*" OR url="*SetDeviceSettings*") url="*TZLocation*" | stats count by src_ip | where count > 5 Atomic Red Team Tests
Sends a crafted HTTP request to a lab D-Link R32 DHMAPI endpoint injecting a benign command after a semicolon in the TZLocation parameter.
Command
curl -s -X POST 'http://192.0.2.10/DHMAPI/SetDeviceSettings' --data 'TZLocation=America/New_York;id' Cleanup
echo 'No persistent change; lab-only request against isolated test device' Expected Telemetry
Proxy/network log entry for POST to /DHMAPI/SetDeviceSettings containing TZLocation with a semicolon metacharacter
Expected Detection
KQL/SPL rule fires on the TZLocation payload containing ';'
Sends a request where the shell metacharacter is URL-encoded to test detection of encoded payloads.
Command
curl -s 'http://192.0.2.10/DHMAPI/SetDeviceSettings?TZLocation=UTC%7Cwhoami' Cleanup
echo 'No cleanup required; read-only benign command on isolated lab device' Expected Telemetry
Network log entry showing TZLocation=UTC%7Cwhoami against the DHMAPI endpoint
Expected Detection
Detection matches the URL-encoded pipe (%7C) in the TZLocation value
Tests detection of command substitution syntax in the TZLocation parameter of the SetDeviceSettings handler.
Command
curl -s -X POST 'http://192.0.2.10/DHMAPI/SetDeviceSettings' --data 'TZLocation=$(uname -a)' Cleanup
echo 'No persistent change; lab-only' Expected Telemetry
Proxy log entry with TZLocation containing $( command substitution against the DHMAPI endpoint
Expected Detection
Detection matches the '$(' command-substitution metacharacter in TZLocation