Submeter #1074577: D-Link DSL-2640B 3.0.6.0.41 OS Command Injection (CWE-78)informação

TítuloD-Link DSL-2640B 3.0.6.0.41 OS Command Injection (CWE-78)
DescriçãoAn OS command injection vulnerability was discovered in D-Link DSL-2640B firmware v3.0.6.0.41 (hardware revision A). The pmapCfgName parameter of /portmapcfg.cmd is copied without any validation into a shell command line: cgiPortMapConfig() (0x4a1df8) reads the parameter and cgiPortMapQrySwitch() (0x49ff10) formats it with sprintf(buf, "ethctl %s vport query 2>/var/vcfgerr\n", pmapCfgName) before calling bcmSystemEx() (0x437fe0), which executes the string with /bin/sh -c (fork + execve("/bin/sh", {"sh","-c",buf})). No character whitelist, length check or interface-name validation exists on the path; the only condition is atoi(pmapIfCfgSts)==1. Reproduction: curl --get --data-urlencode 'action=config' --data-urlencode 'pmapIfCfgSts=1' --data-urlencode 'pmapCfgName=;mkdir /var/bd_pm;#' -u admin:admin http://<device>/portmapcfg.cmd returns HTTP 200 and the directory /var/bd_pm is created on the device; the same request with the hard-coded account (asus / 00202b004720) works without any valid administrator password, and a request without credentials returns 401. All commands run as root because cfm is the root web server. This allows full device compromise, including credential disclosure, firewall/NAT manipulation and persistent implant installation. Proposed CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (8.8).
Fonte⚠️ https://github.com/dujiaode/DSL2640B/tree/main/01-portmapcfg-pmapcfgname-cmd-injection
Utilizador
 qsc19995 (UID 102748)
Submissão04/11/2026 14h39 (há 24 dias)
Moderação28/11/2026 16h27 (24 days later)
EstadoAceite
Entrada VulDB445112 [D-Link DSL-2640B 3.0.6.0.41 Endpoint portmapcfg.cmd cgiPortMapQrySwitch pmapCfgName Elevação de Privilégios]
Pontos20

Might our Artificial Intelligence support you?

Check our Alexa App!