CVE-2026-138287

D-Link DSL-2640B Endpoint portmapcfg.cmd cgiPortMapQrySwitch os command injection

Published Nov 29, 2026 CVSS 4.0 · 10 Critical EPSS 3.0% KEV · Not listed
Description
A flaw has been found in D-Link DSL-2640B 3.0.6.0.41. The impacted element is the function cgiPortMapQrySwitch of the file portmapcfg.cmd of the component Endpoint. This manipulation of the argument pmapCfgName causes os command injection. The attack can be initiated remotely. The exploit has been published and may be used.

Analysis

AI-generated

Technical impact

A flaw in the D-Link DSL‑2640B router firmware (3.0.6.0.41) allows an attacker to exploit the endpoint cgiPortMapQrySwitch in portmapcfg.cmd by manipulating the pmapCfgName argument. This manipulation results in operating‑system command injection, enabling the attacker to execute arbitrary shell commands on the device. The vulnerability is an instance of CWE‑77 and CWE‑78, and the impact is full compromise of confidentiality, integrity, and availability of the affected system.

Affected Systems

The affected product is the D-Link DSL‑2640B router running firmware version 3.0.6.0.41. No other vendors or product variants are listed in the available CNA data.

Risk and Exploitability

The CVSS base score is 10, indicating maximum severity. An exploit is available and has been published, allowing remote attackers to trigger the injection without authentication or additional access prerequisites. The EPSS score is not publicly reported, but the vulnerability is listed as not in the CISA KEV catalog. The combination of a high severity rating, remote availability, and published exploit indicates a high likelihood of real‑world exploitation.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Apply the latest firmware release from D‑Link that removes the vulnerable cgiPortMapQrySwitch function or otherwise hardens the portmapcfg.cmd endpoint.
  • If a firmware update is not immediately available, block or disable external access to the portmapcfg.cmd endpoint and limit remote management to trusted networks.
  • Implement network segmentation or a web application firewall that rejects or sanitizes requests containing the vulnerable pmapCfgName parameter to mitigate command injection attempts.
  • Monitor inbound traffic to the router for unusual command patterns or signs of exploitation attempts and review device logs regularly for anomalous activity.

Generated by OpenCVE AI on November 29, 2026 at 17:20 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 flaw has been found in D-Link DSL-2640B 3.0.6.0.41. The impacted element is the function cgiPortMapQrySwitch of the file portmapcfg.cmd of the component Endpoint. This manipulation of the argument pmapCfgName causes os command injection. The attack can be initiated remotely. The exploit has been published and may be used.
Title D-Link DSL-2640B Endpoint portmapcfg.cmd cgiPortMapQrySwitch 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, 8:11 PM
Reserved
Nov 28, 2026, 3:26 PM
Status
Deferred
Published
Nov 29, 2026, 5:17 PM
Modified
Nov 30, 2026, 9:17 PM