| Título | D-Link DSL-2640B 3.0.6.0.41 OS Command Injection (CWE-78) |
|---|
| Descrição | An OS command injection vulnerability was discovered in D-Link DSL-2640B firmware v3.0.6.0.41
(hardware revision A). In cgiWanCfg() (0x488d64), the ifname parameter of /wancfg.cmd is read into
a 296-byte stack buffer and passed, unvalidated, to sprintf(buf, "echo %d > /proc/var/fyi/wan/%s/wanup", up, ifname) at 0x488dfc; the resulting string is executed by bcmSystemEx() (0x437fe0) with
/bin/sh -c. No interface-name whitelist exists. Two implementation quirks constrain but do not
prevent exploitation: the last byte of the parameter is replaced with NUL (0x488df0), and the
parameter buffer at $sp+0x128 overlaps the sprintf destination at $sp+0x138, so the payload must be
15 bytes or shorter and should end with '#'. Reproduction: curl --get --data-urlencode
'ifname=;mkdir /var/bd_wc;#' -u admin:admin http://<device>/wancfg.cmd returns HTTP 200 and creates
/var/bd_wc on the device (with the hard-coded account asus / 00202b004720 no valid password is
needed; without credentials the request returns 401). No WAN or ADSL state is required - the command
runs inside the handler itself. Commands execute as root.
Proposed CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (8.8). |
|---|
| Utilizador | qsc19995 (UID 102748) |
|---|
| Submissão | 04/11/2026 14h41 (há 24 dias) |
|---|
| Moderação | 28/11/2026 16h27 (24 days later) |
|---|
| Estado | Aceite |
|---|
| Entrada VulDB | 445113 [D-Link DSL-2640B 3.0.6.0.41 /wancfg.cmd cgiWanCfg ifname Elevação de Privilégios] |
|---|
| Pontos | 20 |
|---|