CVE-2026-138288

D-Link DSL-2640B wancfg.cmd cgiWanCfg os command injection

Published Nov 29, 2026 CVSS 4.0 · 10 Critical EPSS 2.5% KEV · Not listed
Description
A vulnerability has been found in D-Link DSL-2640B 3.0.6.0.41. This affects the function cgiWanCfg of the file /wancfg.cmd. Such manipulation of the argument ifname leads to os command injection. The attack can be launched remotely. The exploit has been disclosed to the public and may be used.

Analysis

AI-generated

Technical impact

The affected function cgiWanCfg in the /wancfg.cmd CGI file of the D-Link DSL‑2640B router processes the ifname argument without proper validation. An attacker can supply a crafted value that causes the operating system to execute arbitrary shell commands. This results in complete compromise of the device, allowing the attacker to exfiltrate sensitive data, disrupt network services, or install persistent footholds. The vulnerability is a classic command injection flaw (CWE-77) that, when combined with the ability to invoke shell execution (CWE-78), enables remote code execution. Both confidentiality and integrity of the router’s configuration and the devices behind it are at risk, and availability can be affected if the device is turned off or re‑loaded with malicious firmware.

Affected Systems

Firmware 3.0.6.0.41 of the D-Link DSL‑2640B home router is affected. No other product or version information is known from the advisory.

Risk and Exploitability

The CVSS score of 10 classifies this flaw as critical. The EPSS score is not available, but the vulnerability has been publicly disclosed and is likely exploitable. The KEV catalog lists it as not listed, indicating no confirmed active exploitation yet. The attack can be launched remotely by sending a specially crafted HTTP request to the /wancfg.cmd endpoint, and authentication is not required as the flaw exists in the parameter handling layer. Consequently the risk remains high due to the sheer power of remote command execution and the lack of a mitigating authentication barrier.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest firmware update from D‑Link that patches the cgiWanCfg command injection flaw.
  • If a patch is unavailable, place the router behind a firewall or VLAN and block inbound traffic to the /wancfg.cmd endpoint or the router’s WAN‑side management interface.
  • Change the default administrative credentials of the DSL‑2640B to prevent easy exploitation of the device’s management interface.

Generated by OpenCVE AI on November 29, 2026 at 18:21 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'yes', 'Exploitation': 'poc', 'Technical Impact': 'total'}, 'version': '2.0.3'}

Type Values Removed Values Added
First Time appeared Dlink
Dlink dsl-2640b
Vendors & Products Dlink
Dlink dsl-2640b
Type Values Removed Values Added
Description A vulnerability has been found in D-Link DSL-2640B 3.0.6.0.41. This affects the function cgiWanCfg of the file /wancfg.cmd. Such manipulation of the argument ifname leads to os command injection. The attack can be launched remotely. The exploit has been disclosed to the public and may be used.
Title D-Link DSL-2640B wancfg.cmd cgiWanCfg os command injection
First Time appeared D-link
D-link dsl-2640b
Weaknesses CWE-77
CWE-78
CPEs cpe:2.3:h:d-link:dsl-2640b:*:*:*:*:*:*:*:*
Vendors & Products D-link
D-link dsl-2640b
References
Metrics cvssV2_0

{'score': 10, 'vector': 'AV:N/AC:L/Au:N/C:C/I:C/A:C/E:POC/RL:ND/RC:C'}

cvssV3_0

{'score': 10, 'vector': 'CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H/E:P/RL:X/RC:C'}

cvssV3_1

{'score': 10, 'vector': 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H/E:P/RL:X/RC:C'}

cvssV4_0

{'score': 10, 'vector': 'CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:P'}

Weaknesses
  • CWE-77

    Improper Neutralization of Special Elements used in a Command ('Command Injection')

  • CWE-78

    Improper Neutralization of Special Elements used in an OS Command ('OS Command Injection')

Sources

Status
PUBLISHED
Assigner
VulDB
Published
Updated
Nov 30, 2026, 5:27 PM
Reserved
Nov 28, 2026, 3:26 PM
Status
Deferred
Published
Nov 29, 2026, 5:17 PM
Modified
Nov 30, 2026, 6:18 PM