D-Link DIR-895L L2TP Host Name AVP Out-of-Bounds Write (CVE-2026-100740)
Published: 2026-11-25 • Researcher: murrez (GitHub repository / PoCbit packaging); tzh00203 (original Notion research write-up); VulDB (advisory, CNA)
- Severity
- Critical
- CVE
- CVE-2026-100740 (VulDB 410614; VulDB submission 906303)
- Category
- network
- Affected product
- D-Link DIR-895L wireless router, L2TP control channel parser, tunnel set params function in tunnel.c
- Affected versions
- Firmware A1 revision 102b07 (the only version named in the NVD/VulDB description). NVD lists no structured product or version ranges for this CVE — See references.
- Disclosed
- 2026-11-25
- Patch status
- Unpatched
References
- https://nvd.nist.gov/vuln/detail/CVE-2026-100740
- https://github.com/murrez/CVE-2026-100740
- https://tzh00203.notion.site/D-Link-DIR-895L-L2TP-Host-Name-AVP-Out-of-Bounds-Write-33cb5c52018a8061b139cacc39d58fff
- https://vuldb.com/cve/CVE-2026-100740
- https://vuldb.com/vuln/410614
- https://vuldb.com/submit/906303
- https://vuldb.com/vuln/410614/cti
- https://www.dlink.com/
Archive entry
intelseclab/poc-archiveOn this page
Metadata
| Field | Value |
|---|---|
| Date Added | 2026-11-25 |
| Last Updated | 2026-09-27 |
| Author / Researcher | murrez (GitHub repository / PoCbit packaging); tzh00203 (original Notion research write-up); VulDB (advisory, CNA) |
| CVE / Advisory | CVE-2026-100740 (VulDB 410614; VulDB submission 906303) |
| Category | network |
| Severity | Critical |
| CVSS Score | 9.9 (NVD/VulDB base score; the feed supplies no vector string). VulDB describes its CVSS 4.0 assessment as network reachable, PR:L, high impact — See references. |
| Status | PoC |
| Tags | dlink, dir-895l, router, l2tp, udp-1701, oob-write, cwe-787, firmware, remote, iot |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | D-Link DIR-895L wireless router, L2TP control channel parser, tunnel set params function in tunnel.c |
| Versions Affected | Firmware A1 revision 102b07 (the only version named in the NVD/VulDB description). NVD lists no structured product or version ranges for this CVE — See references. |
| Language / Platform | C (embedded router firmware; architecture not specified in the sources); PoC is Python 3.x using requests and urllib3 |
| Authentication Required | No |
| Network Access Required | Yes (UDP port 1701; the device must process L2TP control messages, typically L2TP WAN/client mode toward an ISP or upstream L2TP server) |
Summary
CVE-2026-100740 is a remote out-of-bounds write in the L2TP control channel parser of D-Link DIR-895L firmware build 102b07 (A1 revision). The tunnel set params function copies a Host Name AVP into a fixed 128-byte peer hostname buffer but writes the terminating NUL at index length plus one, so a 127-byte value writes one byte past the end of the buffer and can corrupt adjacent memory. The flaw is reachable over UDP port 1701 by any party that can deliver L2TP control messages while the router acts as an L2TP client, which in practice means a malicious or spoofed upstream L2TP server. The public PoC fingerprints the device and can send a crafted SCCRQ carrying the oversized Host Name AVP, but it stops at memory corruption and does not ship a full code execution chain.
Vulnerability Details
Root Cause
The L2TP control channel parser in tunnel.c handles the Host Name AVP (attribute type 7) while establishing a tunnel. The value is stored in a fixed 128-byte peer hostname buffer, and the parser clamps the incoming AVP payload to 127 bytes to reserve space for a NUL terminator. The terminator is then written at peer_hostname[len + 1] instead of peer_hostname[len], so a maximum-length 127-byte value places the NUL at index 128, one byte past the end of the array (CWE-787 out-of-bounds write, also classified CWE-119). The corruption is a single NUL byte beyond the 128-byte object and lands on whatever structure follows the buffer in the parser’s allocation.
Attack Vector
Remote, over UDP port 1701. The attacker sends an L2TP control message (SCCRQ) containing a Message Type AVP (type 0) set to 1 and a Host Name AVP (type 7) whose value is 127 bytes long. The device only processes the packet when it is participating in L2TP, normally as a WAN client connecting to an ISP or upstream L2TP server; a malicious or spoofed upstream peer, or anyone who can inject UDP/1701 traffic into that path, can deliver the trigger. The provided PoC only sends the trigger packet: it fingerprints the model over HTTP, checks that UDP 1701 is reachable, and then transmits the crafted SCCRQ.
Impact
Memory corruption in the L2TP control daemon. On the reference hardware the immediate consequence is a crash/reboot or a dropped tunnel (denial of service); depending on heap layout and which adjacent structure is overwritten, the single-byte NUL can potentially be leveraged further, but the public material does not demonstrate code execution or a controlled write. NVD/VulDB score the issue 9.9 because of the network reachability and high confidentiality/integrity/availability weighting, not because a working RCE chain is public.
Environment / Lab Setup
OS: Attacker: Linux (Python 3.8+); target: isolated lab VLAN with no
production uplink.
Target: D-Link DIR-895L, firmware A1 revision 102b07, configured in L2TP
WAN/client mode against a lab-controlled L2TP peer.
Attacker: Same lab segment or a host able to inject UDP/1701 traffic
toward the router's WAN path.
Tools: Python 3, requests, urllib3, tcpdump, a lab L2TP peer or
packet-injection setup, serial console for crash observation.Setup Steps
| |
Proof of Concept
Step-by-Step Reproduction
- Fingerprint the device — the script GETs
/,/Login.html,/login.html,/index.aspand/info/Login.htmland looks for DIR-895L and D-Link markers plus anA1_102b07firmware string.Shell script1python3 poc.py -u 192.168.0.1 --mode check - Confirm UDP 1701 is reachable — sends a one-byte UDP datagram and reports whether the port answers. The parser is only reachable when L2TP is enabled.Shell script
1python3 poc.py -u 192.168.0.1 --mode check --l2tp-probe - Build the trigger — the script assembles an SCCRQ control packet: Message Type AVP (type 0) = 1, then a Host Name AVP (type 7) carrying 127
Hbytes, with control flags0xC802and version 2. - Send the trigger — in exploit mode with
--oob-send, the packet is transmitted to UDP 1701 and the script records the sent byte count plus the packet hex. Without--oob-sendthe script refuses to send anything.Shell script1python3 poc.py -u 192.168.0.1 --mode exploit --oob-send - Observe the target — on an isolated DIR-895L, watch for a crash, reboot, tunnel teardown or serial-console fault. The PoC has no crash oracle, so success must be confirmed out of band on the device.
Exploit Code
See
poc.pyin this folder; the upstream README isupstream-README.md.
| |
Expected Output
| |
exploited only means the datagram was sent, not that the device was compromised. The exact packet length and hex vary with the AVP encoding.
Detection & Indicators of Compromise
- Inbound UDP/1701 control traffic from an address that is not the configured L2TP peer, especially SCCRQ messages whose Host Name AVP (type 7) carries a 127-byte value (AVP length field 134 /
0x86with the mandatory bit set). - L2TP tunnel flaps, authentication retries, or the L2TP daemon restarting immediately after an unsolicited SCCRQ.
- Router crashes, spontaneous reboots, kernel oops or watchdog resets on a device with L2TP enabled; serial console output naming the tunnel setup path.
- HTTP requests to
/Login.html,/index.aspor/info/Login.htmlfrom a host that then sends UDP/1701 traffic — the PoC performs this fingerprint step before the trigger. - Requests carrying the PoCbit user-agent string, which embeds
PoCbit (+https://pocbit.org).
SIEM / IDS rule (example):
| |
Treat the rule as a starting point: validate the AVP encoding against your L2TP implementation before enabling it in production.
Remediation
| Action | Detail |
|---|---|
| Patch | No fixed firmware version is listed in NVD/VulDB at publication. Check the D-Link DIR-895L support page and the VulDB entry for a current advisory; if the model is end-of-life and no fix is published, replacement is the durable fix. |
| Workaround | Disable L2TP WAN/client mode when it is not required. Where it is required, restrict UDP 1701 to the known L2TP peer and drop unsolicited control messages from any other source. |
| Config Hardening | Keep the router behind a firewall that only permits the expected L2TP peer, disable remote administration, monitor for UDP/1701 anomalies and router reboots, and isolate the device on its own segment. |
References
Notes
Auto-ingested from https://github.com/murrez/CVE-2026-100740 on 2026-11-25.
Review verdict: this is a real but limited PoC. The --oob-send path constructs and transmits the actual L2TP SCCRQ with a 127-byte Host Name AVP, which is the memory-corruption trigger — so it is not a pure detector. It also includes scanning conveniences (target list, thread pool, JSONL output) and an HTTP fingerprint step, and the README itself states that it does not ship a full RCE chain. There is no crash oracle: the exploited flag only records that the packet was sent, so impact must be confirmed out of band on the device, and reproduction requires the router to be running L2TP in a role where it parses the attacker’s control messages.
License: MIT (Copyright (c) 2026 yoyo), retained as LICENSE. Archived files: poc.py, requirements.txt, targets.example.txt, the upstream README and the license; the repository’s .gitignore and git history were not copied. The upstream commit is dated 2026-09-27 (“Add files via upload”). Running --mode exploit --oob-send can crash the router — use an isolated lab unit only, never a production uplink.
| |