D-Link DIR-882 OS Command Injection Vulnerability in HNAP1 SetNetworkSettings Handler

Vulnerability

A command injection vulnerability exists in the D-Link DIR-882 router running firmware version 1.01B02. The issue arises in the HNAP1 SetNetworkSettings handler, specifically within the prog.cgi file. The vulnerability is caused by the unsanitized user input of the IPAddress parameter, which is passed to the sprintf function and subsequently to the system function, allowing for the injection of arbitrary operating system commands. This vulnerability can be exploited remotely by an authenticated attacker, with the injected commands executed with root privileges.

Impact

Exploitation of this vulnerability allows for arbitrary operating system command execution with root privileges on the affected device.

Reproduction

To reproduce this vulnerability, an authenticated user can send a request to the HNAP1 SetNetworkSettings handler with a crafted IPAddress parameter that includes shell metacharacters. The lack of proper input validation beyond a minimum string length check allows the injection of commands, which are then executed on the device.

Added: Apr 9, 2026, 5:21 AM
Updated: Apr 9, 2026, 5:21 AM

Vulnerability Rating

Custom Algorithm
spread
4.5
impact
7.5
exploitability
6.2
remediation
0.0
relevance
5.6
threat
6.4
urgency
2.9
incentive
0.0

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