Incident response on call, 24/7: +385 98 1900 984NewIR Retainer: a team on contract before an attack
HR · EN
Critical 10.0CVE-2026-138287

D-Link DSL-2640B OS command injection via portmapcfg.cmd (pmapCfgName)

Published 29/11/2026 · Updated 30/11/2026 · D-Link DSL-2640B

Summary

In D-Link DSL-2640B firmware 3.0.6.0.41, the cgiPortMapQrySwitch function in portmapcfg.cmd (Endpoint component) does not properly validate the pmapCfgName argument. This allows OS command injection (CWE-78/CWE-77).

According to the CVSS vector (10.0, critical), the attack is carried out over the network with low complexity and requires no authentication or user interaction. The scope is changed (S:C), meaning the impact extends beyond the vulnerable component itself. A successful attacker can execute commands on the device, fully compromising confidentiality, integrity and availability.

A public exploit has been published. The vulnerability is not listed in the CISA KEV catalog. Its EPSS score is about 3%, higher than roughly 88% of other vulnerabilities. No fixed version is listed.

Who is affected

Organizations and users running D-Link DSL-2640B routers on firmware 3.0.6.0.41, especially where the web interface is reachable from untrusted networks.

What to do

  1. Check D-Link's official advisories (https://www.dlink.com/) for fixed firmware or the support status of the DSL-2640B. If a patch is available, apply it immediately.
  2. Inventory your DSL-2640B devices and identify those running firmware 3.0.6.0.41.
  3. Disable access to the management web interface from the internet (WAN) and restrict it to trusted addresses.
  4. If no patch is available, consider replacing the device with a supported model.
  5. Monitor device logs and network traffic for signs of unauthorized access or unusual requests to portmapcfg.cmd.

Affected products and versions

D-Link DSL-2640B3.0.6.0.41

CVSS vector, explained

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

Attack vector
Network (from the internet)
Attack complexity
Low
Privileges required
None (no login)
User interaction
Not required
Scope
Affects other components
Confidentiality
High impact
Integrity
High impact
Availability
High impact

Weakness type (CWE)

References

Sources: CVE.org (CNA and CISA ADP), CISA KEV, FIRST EPSS. Always check the vendor's official advisory.