Cloudanix VulnDB

CVE-2024-3273

Critical · 9.8 CISA KEV

CVSS

9.8

EPSS

100.0%

Published

Apr 4, 2024

CISA due date

May 2, 2024

Cloudanix analysis

Act now SSVC: Attend

Unsupported D-Link storage devices can be remotely taken over through their web interface, so they should be disconnected and replaced rather than patched.

Active In The Wild Wormable
Exploitation
Remote Unauthenticated
Attacker needs
None
Complexity
Trivial
Impact
Full Compromise
Component
Firmware
Class
Command Injection
Remediation
Workaround Only
Effort
High
Patch risk
High

What it actually does

CVE-2024-3273 is an unauthenticated remote command injection vulnerability in the HTTP GET request handler for /cgi-bin/nas_sharing.cgi on end-of-life D-Link NAS devices, including DNS-320L, DNS-325, DNS-327L, and DNS-340L families. The vulnerable CGI handler improperly processes the system argument, allowing attacker-controlled input to be interpreted as operating-system commands. Because exploitation is network-accessible, low-complexity, requires no user interaction, and can provide confidentiality, integrity, and availability impact, a successful attacker may execute arbitrary commands with the privileges of the web service on the NAS appliance. In practice, this can lead to device takeover, malware installation, data theft from NAS shares, persistence, lateral movement staging, or destructive actions against stored files.

Why it matters to the business

Affected devices are end-of-life and no vendor-supported fixed versions are available, so continued operation creates a persistent high-risk exposure. The vulnerability is listed in CISA KEV, has known active exploitation, has an extremely high EPSS score of 0.99997, and had a CISA remediation deadline of 2024-05-02, making it a priority issue for any organization still operating these devices. Business consequences include unauthorized access to stored files, loss or encryption of shared data, interruption of file-sharing services, use of the NAS as an internal attack platform, reputational damage, and compliance findings for operating unsupported internet-exposed infrastructure.

How an attack unfolds

An attacker first identifies an exposed D-Link NAS web interface, commonly through internet scanning or by discovering the device on an internal network. The attacker sends a crafted HTTP GET request to the vulnerable /cgi-bin/nas_sharing.cgi endpoint with malicious input in the system parameter. Because the CGI handler fails to safely validate or constrain that parameter, the appliance executes attacker-supplied operating-system commands. After confirming command execution, the attacker may enumerate the device, read or modify files, download additional tooling, add persistence where possible, pivot to reachable internal systems, or use the NAS for botnet, proxy, cryptomining, credential theft, data destruction, or extortion activity. Public exploit details and active in-the-wild exploitation substantially reduce the effort required for opportunistic attackers.

How to fix it

Retire and replace affected D-Link NAS devices; the vendor has confirmed these products are end-of-life and there are no supported fixed versions. Do not expose affected NAS management interfaces to the internet. Until replacement is complete, disconnect affected devices from untrusted networks, block inbound access to the web interface at firewalls, restrict management access to a dedicated administrative network or VPN, and disable UPnP or port-forwarding rules that expose the device. Treat any exposed vulnerable device as potentially compromised: preserve evidence if needed, remove it from the network, rotate credentials associated with NAS shares or administrative access, review stored data for unauthorized access or modification, and rebuild or migrate data to a supported platform rather than relying on a factory reset as a complete security fix.

How to confirm the fix worked

Confirm whether any D-Link DNS-320L, DNS-325, DNS-327L, DNS-340L, or related affected NAS models remain deployed. Validate that no affected device is reachable from the internet by testing external exposure and reviewing firewall, NAT, and UPnP mappings. Internally, verify that access to any remaining NAS web interface is blocked except from explicitly approved administrative networks. Check firmware and model information, but do not rely on firmware updates as a remediation because no supported fixed versions are available for the end-of-life devices. After replacement or isolation, confirm that /cgi-bin/nas_sharing.cgi is not externally reachable and that logs no longer show requests containing the system parameter against that endpoint.

Typical attack path

  1. Scan for D-Link NAS devices exposing the web management interface over HTTP or HTTPS.
  2. Fingerprint the device model and vulnerable CGI endpoint.
  3. Send a crafted GET request to /cgi-bin/nas_sharing.cgi using the system parameter to trigger command execution.
  4. Validate execution by observing command output, callback traffic, or device behavior.
  5. Run reconnaissance commands to identify firmware, users, mounted shares, network interfaces, and reachable systems.
  6. Retrieve or stage additional scripts or binaries using built-in utilities such as wget, curl, tftp, or busybox where available.
  7. Access, exfiltrate, alter, or delete NAS-hosted files and configuration data.
  8. Attempt persistence, botnet enrollment, proxying, or lateral movement from the NAS into adjacent networks.

How to detect it

Investigate all affected or formerly exposed NAS devices for prior exploitation. Primary log sources include NAS web access logs if available, reverse proxy logs, firewall and NAT logs, IDS/IPS alerts, DNS logs, NetFlow, endpoint/network telemetry, and file integrity or backup logs for NAS shares. Look for HTTP GET requests to /cgi-bin/nas_sharing.cgi with the system parameter, especially values containing command separators, URL-encoded shell metacharacters, attempts to invoke id, uname, wget, curl, tftp, busybox, sh, bash, chmod, or commands writing to /tmp or /var/tmp. Review outbound connections from the NAS shortly after suspicious requests, including HTTP downloads, DNS lookups for unfamiliar domains, connections to high-risk ports, and repeated connections to a single external host. On the device or preserved filesystem image, look for unexpected scripts, binaries, cron entries, modified startup files, new user or share definitions, altered permissions, unknown processes, suspicious files in temporary directories, and evidence of data staging such as archives of shared folders. Because these devices are embedded and often log minimally, absence of logs should not be treated as proof of no compromise if the device was exposed.

  • /cgi-bin/nas_sharing.cgi
  • nas_sharing.cgi?
  • system=
  • /cgi-bin/nas_sharing.cgi?*system=
  • GET /cgi-bin/nas_sharing.cgi
  • GET /cgi-bin/nas_sharing.cgi?user=messagebus
  • passwd=&cmd=15&system=
  • %3B
  • %26
  • %7C
  • %60
  • %24%28
  • ;wget
  • ;curl
  • ;tftp
  • ;busybox
  • ;chmod
  • /tmp/
  • /var/tmp/
  • wget http
  • curl http
  • tftp -g
  • busybox wget
  • chmod +x
  • sh -c
  • /bin/sh

What your security team should do

  • Immediately identify and remove internet exposure for affected D-Link NAS devices, prioritizing any system reachable over HTTP or HTTPS from untrusted networks.
  • Retire and replace affected end-of-life NAS appliances; there is no vendor-supported patch path.
  • Treat exposed devices as potentially compromised and begin incident-response triage before reconnecting or migrating data.
  • Search historical web, proxy, firewall, IDS, and NAS logs for requests to /cgi-bin/nas_sharing.cgi, especially requests containing system= or shell metacharacters.
  • Block requests to /cgi-bin/nas_sharing.cgi at perimeter controls where feasible while decommissioning is underway.
  • Review outbound traffic from affected NAS devices for unusual connections, downloads, DNS lookups, or callbacks to unfamiliar infrastructure.
  • Rotate NAS administrative credentials, share credentials, and any credentials stored on or used by the device.
  • Inspect NAS file shares for suspicious new files, unexpected permission changes, ransom notes, deleted content, or unauthorized archives.
  • Disable UPnP and remove port-forwarding rules that expose NAS management services.
  • Document compensating controls and replacement timelines because the vulnerability is in CISA KEV and the CISA remediation deadline has already passed.

The record

** UNSUPPORTED WHEN ASSIGNED ** A vulnerability, which was classified as critical, was found in D-Link DNS-320L, DNS-325, DNS-327L and DNS-340L up to 20240403. Affected is an unknown function of the file /cgi-bin/nas_sharing.cgi of the component HTTP GET Request Handler. The manipulation of the argument system leads to command injection. It is possible to launch the attack remotely. The exploit has been disclosed to the public and may be used. The identifier of this vulnerability is VDB-259284. NOTE: This vulnerability only affects products that are no longer supported by the maintainer. NOTE: Vendor was contacted early and confirmed immediately that the product is end-of-life. It should be retired and replaced.

Affected packages

Ecosystem Package Introduced Fixed

Related vulnerabilities