D-Link DIR-816L Command Injection Vulnerability Allowing Remote Code Execution

Vulnerability

A critical command injection vulnerability has been identified in the D-Link DIR-816L router, affecting versions through 2.06B01. The issue arises in the Environment Variable Handler component, specifically within the 'lxmldbc_system' function of the '/htdocs/cgibin' file. The vulnerability allows remote attackers to execute arbitrary commands by manipulating environment variable parameters. Exploitation is possible because the application only filters out backtick characters, leaving other command symbols unrestrained. This flaw takes advantage of internal 'sprintf' and 'system' calls, leading to unauthorized command execution.

Impact

Exploitation of this vulnerability allows for arbitrary command execution on the affected device, potentially leading to full system compromise.

Reproduction

To reproduce this vulnerability, send a crafted SSDP (Simple Service Discovery Protocol) message that includes environment variable parameters. The DIR-816L router will process these variables through the 'lxmldbc_system' function, where the lack of proper input validation can be exploited to inject and execute arbitrary commands on the device.

Added: Jul 19, 2025, 5:18 PM
Updated: Jul 19, 2025, 5:18 PM

Vulnerability Rating

Custom Algorithm
spread
6.8
impact
7.5
exploitability
9.1
remediation
0.0
relevance
0.3
threat
6.4
urgency
2.9
incentive
9.2

Our algorithm analyzes dozens of metrics to generate these 8 key vulnerability categories, which are then combined to calculate the overall risk score.