Automated Threat Modeling

Brief Summary: D-Link DMS-3130 and DXS-3130 CVE-2026-138356 Authenticated OS Command Injection

A summary of CVE-2026-138356, an authenticated OS command injection in D-Link DMS-3130 and DXS-3130 switches running firmware 1.20.P006, with notes on the public proof of concept and the absence of a confirmed vendor fix.

CVE Analysis

6 min read

Gaurav Sarraf
Gaurav Sarraf

2026-11-29

Brief Summary: D-Link DMS-3130 and DXS-3130 CVE-2026-138356 Authenticated OS Command Injection

Introduction

Managed aggregation switches sit at the core of enterprise and campus networks, so command injection in their web management plane is worth examining closely. CVE-2026-138356 affects D-Link's DMS-3130 and DXS-3130 switch families on firmware 1.20.P006, where an authenticated web request can steer input into an unquoted operating system command.

The DXS-3130 and DMS-3130 are Layer 3 stackable aggregation switches that D-Link positions for enterprise, campus, high rise community, and Metro Ethernet deployments. They expose a Lua based web management application, and the vulnerability lives inside that application. Because these devices operate as infrastructure, the integrity of their management interface matters to anything that depends on them.

Technical Information

The vulnerability is classified under CWE-77 (Command Injection) and CWE-78 (OS Command Injection). The affected code is the file application/webroot/lua/DataStore/369_copyfile.lua, and the tainted input is the request argument http_src_file. The root cause is unsafe command construction: http_src_file reaches an operating system command without proper neutralization of shell metacharacters.

The accepted VulDB researcher submission documents the following reported source analysis flow through http_file_transfer_download(). These are reported findings from source review rather than independently reproduced execution results:

  • Input collection: line 509 obtains POST data through get_user_input(), so the data enters through a web request.
  • Dispatch: lines 540 through 549 dispatch a POST containing http_src_file to http_file_transfer_download(), selecting the relevant processing path.
  • Assignment: line 83 assigns fpost.http_src_file to src_file, so the submitted value becomes the source filename variable.
  • Transfer selection: lines 110 through 147 prepare the transfer, and hiddest_filetype=1 selects the firmware image branch used by the proof of concept.
  • Command execution: line 150 uses strip_filename(src_file) to derive web_temp_file; lines 154 through 156 then construct and execute mv %s %s%s using the original, unquoted src_file.

The key distinction is between processing a derived temporary filename and protecting the original value used in the command. Filename handling applied elsewhere does not sanitize the original src_file, so that original input still reaches the shell command.

The CVSS 3.1 vector is CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:C/C:H/I:H/A:H/E:P/RL:X/RC:C, recording network access, low attack complexity, high privileges required, no user interaction, changed scope, and high confidentiality, integrity, and availability impact. The CVE record lists a CVSS 3.1 base of 9.1 (Critical) and a CVSS 4.0 of 9.4 (Critical). The high privileges requirement means this is an authenticated attack, not a demonstrated authentication bypass. The sources do not establish root execution, a full request URL, or a successful attack against a production victim.

The attack flow, as described by the sources, works like this: an attacker with authenticated access to the web management endpoint submits a POST request containing http_src_file with shell metacharacters, selects the firmware image transfer branch via hiddest_filetype=1, and the unquoted src_file value is interpolated into the mv command and executed by the device.

Proof of Concept

A public proof of concept is available, referenced directly by the assigning CNA (VulDB) as the exploit reference for this record. VulDB marks the exploit maturity as Proof-of-Concept (CVSS temporal E:P / E:POC).

The exploit is hosted in the public GitHub repository jiangnandiyishenqin/D-link-DMS_DXS-3130, created 2026-11-05. Inspection via the GitHub Contents API shows a single artifact on the main branch:

  • DMS-DXS3130.zip (sha 552e0d9cf8e8750b429fc6285cd84c7f75b0abe9, approximately 776 KB)
  • Raw download: https://raw.githubusercontent.com/jiangnandiyishenqin/D-link-DMS_DXS-3130/main/DMS-DXS3130.zip

The repository contains no README or text based writeup. The exploit material is packaged entirely inside this binary ZIP archive. Because the artifact is a binary archive, its exact exploit script, payload strings, and the precise HTTP request targeting 369_copyfile.lua / http_src_file could not be extracted or validated from the fetched sources, and the archive was not detonated. No exact code snippet is therefore reproduced here.

Public availability of the PoC is corroborated across the official CVE record (VulDB CNA, published 2026-11-30), the VulDB entry VDB-445159 (status Proof-of-Concept, stating a public exploit is known and downloadable at github.com), and the CIRCL Vulnerability-Lookup mirror, all citing the same GitHub repository. This confirms documented public PoC availability. It does not constitute independently tested working exploitation, since the archived contents were not run. Submitter and credit: VulDB user Luminaa (Submit #1075827).

Affected Systems and Versions

  • D-Link DMS-3130, firmware 1.20.P006
  • D-Link DXS-3130, firmware 1.20.P006

The reviewed records confirm the named models at version 1.20.P006. They do not establish that every firmware release is vulnerable, so this named model and version pair should be used as the confirmed assessment scope. No reviewed source identifies a firmware version confirmed to fix this CVE. D-Link publishes V1.31.001 (dated April 1, 2026) for the DMS-3130 A1 and DXS-3130 A1 series, but its listed fixes do not identify 369_copyfile.lua, http_src_file, command injection, or this CVE, so it cannot be presented as a confirmed fix. The same release notes document an upgrade prerequisite: before upgrading from V1.20.XXX to V1.31.XXX, first upgrade to V1.30.000 and reboot, then proceed to V1.31.001.

Vendor Security History

In 2019, D-Link Systems agreed to a comprehensive software security program to settle FTC litigation concerning security representations for wireless routers and Internet connected cameras. The FTC's underlying 2017 complaint alleged failures in basic secure software development, including examples involving fixed login credentials and readable stored credentials. The settlement announced July 2, 2019 required security planning, threat modeling, vulnerability testing before release, ongoing monitoring, automatic firmware updates, acceptance of researcher reports, and independent assessments every two years for 10 years. Those allegations and obligations concerned other products and do not constitute findings about the switches discussed here. D-Link currently describes a Product Security Team responsible for vulnerability receipt, investigation, and public reporting, but a response or fixed firmware specifically tied to this CVE was not identified in the reviewed vendor material.

References

Detect & fix
what others miss

Works with
  • GitHub
  • GitLab
  • Bitbucket
  • Azure DevOps Services
  • Gerrit
  • CVS
  • Jira
  • Linear
  • Slack
  • Security Compass
Explore integrations
Security magnifying glass visualization