D-Link DIR-600 Stack-Based Buffer Overflow Vulnerability in hedwig.cgi HTTP Header Cookie

Vulnerability

A stack-based buffer overflow vulnerability has been identified in the D-Link DIR-600 router, specifically in firmware versions prior to 2.15WWb02. The issue arises in the CGI program hedwig.cgi, where user-controlled input from the HTTP_COOKIE header is improperly validated before being copied into a fixed-size stack buffer. This vulnerability can be exploited remotely, allowing an attacker to overwrite critical stack data, including saved registers and the return address, with carefully crafted input. Exploitation of this vulnerability enables arbitrary code execution on the device.

Impact

Exploitation of this vulnerability leads to a stack-based buffer overflow, allowing remote code execution with root privileges on the affected device.

Reproduction

The vulnerability can be reproduced by sending an HTTP POST request to the router's web server with an excessively long Cookie value. The request must be crafted to include the overflow data that exploits the buffer overflow vulnerability in hedwig.cgi. This can be done using a tool like QEMU to emulate a MIPS environment, where the exploit can be executed as a proof-of-concept.

Added: Dec 29, 2025, 4:35 PM
Updated: Dec 29, 2025, 4:35 PM

Vulnerability Rating

Custom Algorithm
spread
6.8
impact
7.5
exploitability
9.1
remediation
0.0
relevance
1.6
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.