On this page (7 sections)
A critical OS command injection flaw, tracked as CVE-2026-138287, has been published for the D-Link DSL-2640B router running firmware 3.0.6.0.41. According to the NVD record, the attack can be started remotely and an exploit has already been published.
If you manage this router at an office, a branch location or for a client, treat it as a priority to check. The sources reviewed so far do not describe a vendor fix, so most of the work right now is reducing exposure.
What was disclosed
The NVD entry, published on 2026-11-29, describes a flaw in the function cgiPortMapQrySwitch in the file portmapcfg.cmd, part of the device's Endpoint component. Manipulating the argument pmapCfgName leads to OS command injection.
The record states the attack can be launched remotely and that the exploit has been published and may be used. The references point to a write-up on GitHub and to VulDB entries. They also include the D-Link home page, not a specific security advisory.
What command injection means on a router
OS command injection happens when a device takes a value supplied by a user, here a configuration name passed to a port mapping function, and uses it to build a command that the underlying operating system runs. If the input is not strictly validated, an attacker can get the device to run commands of their choosing.
On a home or small office router, those commands typically run with high privileges. Consequences of this class of bug commonly include changing DNS settings, intercepting or redirecting traffic, opening further access into the local network, or enrolling the device in a botnet. The research does not say which of these apply to this specific flaw, so treat them as the general risk of the weakness class, not confirmed behavior.
Who is realistically exposed
- Anyone using a D-Link DSL-2640B on firmware 3.0.6.0.41, the only version named in the record. Other versions are not listed, so their status is unknown.
- Devices whose web management interface is reachable from the internet, since the record says the attack can be initiated remotely.
- Devices on networks where untrusted users or compromised machines can reach the router's admin interface.
DSL routers like this are often older equipment kept in service for years. Check whether the model is still supported by D-Link before assuming a patch will ever arrive.
How to check your exposure
Start by confirming the model and firmware. Log in to the router's admin page from inside your network and look at the device information or status page, which normally shows the model name and firmware version. Compare the firmware to 3.0.6.0.41.
Next, check whether the admin interface is reachable from outside. From a machine on a different network (for example a phone on mobile data), try to open the router's public IP address in a browser. If you see a login page, remote management is exposed. You can also review the router's remote management or WAN access settings directly.
What to do now
- Identify every DSL-2640B you operate and note its firmware version.
- Disable remote or WAN-side administration in the router settings, so the admin interface is reachable only from the local network.
- Restrict LAN access to the admin page to a trusted management device or VLAN where the router supports it.
- Check the D-Link support site for firmware for the DSL-2640B. The research found no fix, so do not assume one exists, and install only firmware downloaded from D-Link.
- If D-Link lists the model as end of life or offers no fix, plan to replace it with a supported device, and put it behind a separate firewall in the meantime.
- Change the router admin password to a unique, strong one, and review DNS, port forwarding and port mapping settings for entries you did not create.
- If you see unexplained settings changes, unfamiliar port mappings or odd traffic, follow a recovery process: back up your settings, reset the device, reflash trusted firmware and set new credentials.
Detection and monitoring
Because the affected component is a router, most signs show up in its configuration and in your network traffic, not on a website. Watch for changed DNS servers, new port mapping rules, unexpected outbound connections from the router, and repeated requests to management paths from unknown addresses in any logs the device keeps.
If websites sit behind this router, monitoring helps you notice side effects such as redirected DNS or unexpected certificate changes. Webforta Monitor tracks uptime, certificates and DNS changes, and the free SSL checker lets you confirm a certificate is what you expect. These do not detect or fix this router flaw, but they can reveal downstream tampering. For broader background, see what to do if your website is hacked.
Timeline
| Date | Event |
|---|---|
| 2026-11-29 | CVE-2026-138287 published in NVD with a CVSS score of 9.3 and a published exploit noted |
| As of 2026-11-29 | No vendor advisory or fixed firmware identified in the research |
Sources
This article is based on the public sources below. Details can change as vendors and researchers publish more; check the original advisories before acting on version numbers.
