Critical Vulnerabilities in D-Link Routers Expose Networks to Remote Attacks

Recent analyses have uncovered multiple critical vulnerabilities in D-Link’s DIR-816 router models, posing significant security risks to users. These flaws could allow remote attackers to execute arbitrary code and gain unauthorized access to network infrastructures.

Overview of the Vulnerabilities

The identified vulnerabilities affect all hardware revisions and firmware versions of the non-US DIR-816 models, which have now reached their End-of-Life (EOL) status. This means that D-Link will not release any security patches or firmware updates to address these issues, leaving the devices permanently vulnerable.

Buffer Overflow Flaws Enable Remote Code Execution

Four of the six vulnerabilities are classified as critical stack-based buffer overflow attacks, each with a Common Vulnerability Scoring System (CVSS) score of 9.8, indicating the highest severity level.

– CVE-2025-5622: This flaw resides in the `wirelessApcli_5g` function within the `/goform/wirelessApcli_5g` endpoint. By manipulating parameters such as `apcli_mode_5g`, `apcli_enc_5g`, and `apcli_default_key_5g`, an attacker can cause memory corruption, leading to potential code execution.

– CVE-2025-5623 and CVE-2025-5624: Both vulnerabilities target the `qosClassifier` function in the `/goform/qosClassifier` endpoint. Exploiting the `dip_address` and `sip_address` arguments can trigger stack-based buffer overflows, allowing attackers to execute arbitrary code.

– CVE-2025-5630: This critical vulnerability affects the `/goform/form2lansetup.cgi` file through manipulation of the `IP` parameter, leading to potential remote code execution.

These vulnerabilities fall under the Common Weakness Enumeration (CWE) categories of CWE-121 (Stack-based Buffer Overflow) and CWE-119 (Memory Corruption). Exploitation of these flaws enables attackers to overwrite memory segments and potentially execute malicious code with administrative privileges.

Command Injection Vulnerabilities

In addition to buffer overflow flaws, two high-severity vulnerabilities involve operating system (OS) command injection attacks:

– CVE-2025-5620: This vulnerability targets the `setipsec_config` function in the `/goform/setipsec_config` endpoint. By manipulating the `localIP` and `remoteIP` parameters, attackers can inject arbitrary system commands.

– CVE-2025-5621: Similar to the previous flaw, this vulnerability exploits the `qosClassifier` function through the `dip_address` and `sip_address` parameters, allowing for command injection.

These command injection flaws are categorized under CWE-78 (OS Command Injection) and CWE-77 (Command Injection), each carrying a CVSS score of 7.3. Exploitation of these vulnerabilities enables attackers to execute unauthorized operating system commands remotely.

Immediate Retirement Recommended

The vulnerabilities were initially disclosed by security researcher pjqwudi through VULDB Disclosure, highlighting the critical nature of these network infrastructure security flaws.

D-Link has officially designated all DIR-816 models as End-of-Service (EOS), meaning no firmware updates or security patches will be released. The company strongly recommends the immediate retirement of these devices, warning that continued use poses significant security risks to connected networks.

Recommendations for Users

Given the severity of these vulnerabilities and the lack of available patches, users are advised to take the following actions:

1. Replace Affected Devices: Transition to current-generation products with active firmware development and support.

2. Data Backup: Perform comprehensive backups of all critical data before replacing the device to prevent data loss.

3. Consult D-Link Support: Contact D-Link regional offices or authorized retailers for recommendations on suitable replacement devices that meet current security standards.

Broader Implications

The discovery of these vulnerabilities underscores the importance of regular firmware updates and the risks associated with using outdated hardware. As devices reach their End-of-Life, they no longer receive security patches, making them prime targets for cyberattacks.

Users should remain vigilant and proactive in managing their network devices, ensuring that all hardware is up-to-date and supported by the manufacturer. Regularly reviewing and updating network infrastructure can significantly reduce the risk of unauthorized access and potential data breaches.

Conclusion

The critical vulnerabilities found in D-Link’s DIR-816 routers highlight the ongoing challenges in network security, especially concerning legacy devices. Users must prioritize the security of their network infrastructure by replacing outdated hardware and adhering to best practices for device management. By taking these steps, individuals and organizations can better protect themselves against potential cyber threats and ensure the integrity of their network environments.