CVE-2026-138287 is a critical OS command injection flaw in D-Link DSL-2640B firmware 3.0.6.0.41: a remote attacker can trigger it through the pmapCfgName argument of portmapcfg.cmd, and a public exploit has been released.
What Is It
The flaw is in the cgiPortMapQrySwitch function of the portmapcfg.cmd file, inside the device's Endpoint component. An attacker who manipulates the pmapCfgName argument can inject operating system commands. The weakness is classified as CWE-77 (Command Injection) and CWE-78 (OS Command Injection).
VulDB, the CNA, disclosed the vulnerability. NVD published it on 2026-11-29 and currently lists it with a status of "Deferred."
Why It Matters
The CNA scores this flaw at the top of the scale:
- CVSS 3.1: 10.0 CRITICAL (
AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H) - CVSS 4.0: 9.3 CRITICAL, with exploit maturity rated Proof-of-Concept
- CVSS 2.0: 10.0
The vectors show an attack that works over the network, needs little effort, and requires no privileges or user interaction. Confidentiality, integrity and availability impacts are all rated high, and the scope is "Changed." That means a successful attack could reach beyond the vulnerable component itself.
The NVD description says the exploit "has been published and may be used," and a public proof-of-concept repository is listed among the references. However, the supplied CISA KEV entry is empty. KEV does not currently confirm active exploitation of this CVE.
What's Vulnerable
- Vendor: D-Link
- Product: DSL-2640B
- Affected version: 3.0.6.0.41
- Component: Endpoint (
portmapcfg.cmd, functioncgiPortMapQrySwitch) - CPE:
cpe:2.3:h:d-link:dsl-2640b:*:*:*:*:*:*:*:*
The record does not list any other affected versions.
Patch Status
The supplied records do not mention a vendor patch, fixed firmware version or official workaround. There is no KEV entry, so CISA has issued no required action or remediation deadline. The references include D-Link's general website but no specific advisory. Owners of affected devices should check D-Link directly for updates. Exploit code is public and no fix is documented. Anyone who can reach an exposed DSL-2640B running 3.0.6.0.41 over the network could run commands on it without a password.