D-Link DIR-600L HNAP SOAPAction Pre-Auth Stack Buffer Overflow (CVE-2026-129354)
Published: 2026-11-25 • Researcher: googlesky (Lê Hiếu), laboratory and differential PoC; ruanyi (VulDB user ruanyi101), original advisory and disclosure
- Severity
- Critical
- CVE
- CVE-2026-129354 (VulDB 437417)
- Category
- network
- Affected product
- D-Link DIR-600L wireless router (hardware revision B1, shared DIR-600Bx platform image); HNAP handler hnap_main in htdocs/cgibin, reached as /usr/sbin/hnap through boa's /HNAP1/ mapping
- Affected versions
- Firmware 2.17b02 (the re-hosted image is DIR-600Bx_FW217b02.bin, MD5 2f953ec274caeab6bc643045da56ab29, matching the upstream advisory). NVD records the 2.17b02 version only; no version ranges are listed.
- Disclosed
- 2026-11-25
- Patch status
- Unverified
Tags
References
- https://nvd.nist.gov/vuln/detail/CVE-2026-129354
- https://www.cve.org/CVERecord?id=CVE-2026-129354
- https://vuldb.com/vuln/437417
- https://vuldb.com/vuln/437417/cti
- https://vuldb.com/submit/1043526
- https://github.com/ruanyi101/router-firmware-security-advisories/blob/main/router-firmware-GitHub-advisories/advisories/D-Link-DIR-600L-HNAP-SOAPAction.md
- https://supportannouncement.us.dlink.com/security/publication.aspx?name=SAP10393
- https://github.com/googlesky/CVE-2026-129354
- https://github.com/captn3m0/dir-600l
- https://www.dlink.com/
Archive entry
intelseclab/poc-archiveOn this page
Metadata
| Field | Value |
|---|---|
| Date Added | 2026-11-25 |
| Last Updated | 2026-11-19 |
| Author / Researcher | googlesky (Lê Hiếu), laboratory and differential PoC; ruanyi (VulDB user ruanyi101), original advisory and disclosure |
| CVE / Advisory | CVE-2026-129354 (VulDB 437417) |
| Category | network |
| Severity | Critical |
| CVSS Score | 10.0 — CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:C/C:H/I:H/A:H (VulDB) |
| Status | PoC |
| Tags | dlink, dir-600l, router, hnap, soapaction, stack-buffer-overflow, cwe-121, pre-auth, qemu-user, iot |
| Related | N/A |
Affected Target
| Field | Value |
|---|---|
| Software / System | D-Link DIR-600L wireless router (hardware revision B1, shared DIR-600Bx platform image); HNAP handler hnap_main in htdocs/cgibin, reached as /usr/sbin/hnap through boa’s /HNAP1/ mapping |
| Versions Affected | Firmware 2.17b02 (the re-hosted image is DIR-600Bx_FW217b02.bin, MD5 2f953ec274caeab6bc643045da56ab29, matching the upstream advisory). NVD records the 2.17b02 version only; no version ranges are listed. |
| Language / Platform | C; 32-bit MIPS-I little-endian (mipsel), uClibc 0.9.30.1, stripped non-PIE ELF; reproduced under qemu-mipsel-static in a container |
| Authentication Required | No |
| Network Access Required | Yes (LAN side by default; WAN side if remote management is exposed) |
Summary
CVE-2026-129354 is a pre-authentication stack-based buffer overflow in the HNAP handler of the D-Link DIR-600L. The handler takes the HNAP action from the client-supplied SOAPAction header, accepts any header that merely contains a whitelisted action name, and copies everything after the last slash into a 256-byte stack buffer with an unbounded string copy. A single unauthenticated HTTP request to /HNAP1/ therefore corrupts the CGI child process; the shipped binary crashes reproducibly at fault address 0x45454545, and the upstream laboratory further proves saved return address control with an attacker-chosen program counter of 0x42424242. The device is end-of-life and no vendor fix exists or will exist (D-Link SAP10393).
Vulnerability Details
Root Cause
In the shipped htdocs/cgibin, the HNAP entry point selected for /usr/sbin/hnap reads the HTTP_SOAPACTION environment variable, tests it against the two known whitelist names with strstr() (a substring test, not an equality or prefix test), and then derives the action to execute from strrchr(soap, '/') + 1, i.e. everything after the last slash of the same attacker-controlled header. That action string is copied into a 256-byte stack buffer (auStack_228) with an unbounded strcpy(), and the same unbounded value is re-formatted into a shell command template with an unbounded sprintf() before being passed to system(). Because the whitelist check and the used action are different substrings of the header, a header of the form http://purenetworks.com/HNAP1/GetDeviceSettings/<long suffix> passes pre-authentication while the long suffix is what reaches the unsafe copies. The saved return address sits 236 bytes above the destination buffer. The weakness classes are CWE-121 (stack-based buffer overflow) and CWE-119 (memory corruption).
Attack Vector
An unauthenticated network attacker sends one HTTP request to the device’s HNAP endpoint (/HNAP1/, served by boa and dispatched to the multi-call CGI /usr/sbin/hnap) whose SOAPAction header contains a whitelisted action name followed by / and an over-long suffix. Quoted or unquoted headers, GET or POST, both whitelist entries, and the whitelist name placed in the middle of the header all satisfy the substring test; the suffix after the last slash is the action used. Suffixes at or above roughly 260 bytes fault the CGI child, and a NUL-free, pointer-preserving suffix of 236 bytes reaches the saved $ra. The lab maps the header to HTTP_SOAPACTION exactly as boa does, forks the guest CGI per request, and reports the child’s fault address.
Impact
Pre-authentication memory corruption of the HNAP CGI with demonstrated instruction-pointer control. Each malicious request kills the CGI child (SIGSEGV, HTTP 500-class response) while the httpd parent keeps serving, giving a reliable denial of service; on exploitation of the return-address primitive, arbitrary code execution as the web server (which runs as root on the device) is the expected outcome. The PoC stops at control of the program counter and does not ship a code-execution payload. On real hardware, turning that control into code execution additionally requires knowledge of the target memory layout and a suitable gadget or shellcode location.
Environment / Lab Setup
OS: Linux x86_64 host running Podman (Docker-compatible)
Target: cve-2026-129354:lab container (Debian bookworm-slim + qemu-user-static),
re-hosting the extracted DIR-600L 2.17b02 rootfs at /firmware.
Vulnerable side: LAB_BOUNDS_SHIM=0 (firmware exactly as shipped).
Remediated side: LAB_BOUNDS_SHIM=1 (same binary + bounds-enforcing shim).
Attacker: python:3.12-alpine PoC container (stdlib only), same cve129354lab network
Tools: podman, qemu-mipsel-static 7.2.22, sasquatch/binwalk, mipsel-linux-gnu-gcc,
strace (via qemu -strace), Ghidra 12.1.4 for the decompilationSetup Steps
The lab fetches the vendor firmware at image build time and enforces its MD5, so the image and the binary are the real vendor artefacts rather than a re-implementation. Nothing executes on the host; the guest runs only inside the container chroot. The front end (lab/service.py) re-creates boa’s CGI model for HNAP: one child per request, SOAPAction to HTTP_SOAPACTION, the URL in REQUEST_URI, the body on stdin, and /var/run/hnap.lock creatable, so a guest crash is reported as a SIGSEGV with its si_addr rather than a service outage.
| |
Requirements: Podman (or Docker) with network-creation rights, outbound HTTPS for the firmware download, and roughly 4 GB RAM plus 2 CPUs per router container. Captured runs are in evidence/.
Proof of Concept
Step-by-Step Reproduction
- Prepare the environment — build the images and start both router containers with
./run-lab.sh buildand./run-lab.sh up. The lab image extractsDIR-600Bx_FW217b02.bin(MD5-checked), verifieshtdocs/cgibin(MD5 e7016496219d73b3be39cad163995fcc), and runs it under qemu-mipsel-static. - Baseline crash (advisory signature) — deliver a 500-byte
'E'fill as the action suffix behind a whitelisted HNAP name. The CGI child dies with SIGSEGV atsi_addr=0x45454545, exactly the signature in the upstream advisory’s capture.Shell script1 2podman run --rm --network cve129354lab cve-2026-129354-poc:local \ check --host=hnap-vuln - Locate the saved return address —
exploitstage 2 sweeps candidate offsets in a 128-byte window around the calibrated 236-byte offset with a NUL-free pointer-preserving fill (0x3ff6cd44, bytes into the always-mapped uClibc text region) and writes the marker0x42424242at each candidate. The pointers stay valid until the epilogue, so execution reachesjr $ra.Shell script1 2podman run --rm --network cve129354lab cve-2026-129354-poc:local \ exploit --host=hnap-vuln - Confirm control — when the faulting address equals the marker, the saved
$rais proven attacker-controlled. The captured run reports the overwrite at offset 236 (0xec) with faulting PC0x42424242. - Differential on the remediated side — repeat against
--host=hnap-fixed, where the same binary is loaded withLD_PRELOAD=/usr/lib/bndshim.so(boundedstrcpy/sprintf, cap 256). No crash occurs at any length, confirming that the crashes are exactly the unbounded copies. - Boundary and delivery matrix (optional) —
probechecks whitelist entries, quoted versus unquoted headers, GET versus POST, sub-threshold versus over-threshold lengths, the missing-header default path, and thestrrchr-misses edge case;mitigationcontrasts the effective front-end header cap.
Exploit Code
See
exploit/exploit.py(standalone full chain: crash, then saved-RA control) andpoc/poc.py(stdlib-onlycheck/exploit/probe/mitigationdriver). Both are archived from the upstream repository unchanged apart from the research-only header.
The minimal delivery shape is a single request whose SOAPAction carries the payload:
| |
Expected Output
| |
Captured verbatim in evidence/exploit-vuln-run.txt; the baseline run is in evidence/check-vuln-run.txt. The standalone exploit exits 1 on a confirmed vulnerable target and 0 on a safe one.
Screenshots / Evidence
evidence/check-vuln-run.txt—checkagainst the shipped binary: SIGSEGV at0x45454545evidence/exploit-vuln-run.txt— two-stage run: crash signature then saved-$racontrol (0x42424242)evidence/versions.txt— firmware,cgibin, qemu and image digests used for the differential
Detection & Indicators of Compromise
- Requests to
/HNAP1/whoseSOAPActionheader contains a whitelisted HNAP action name followed by/and more than roughly 256 bytes of suffix, especially long runs of one byte such asEorG. - HTTP 500-class responses or connection resets for the HNAP endpoint, or CGI child processes dying with SIGSEGV while the httpd keeps serving (one crash per request is the characteristic pattern).
- Fault addresses containing the attacker fill:
0x45454545(EEEE) or an attacker-chosen marker such as0x42424242; in the emulated lab the qemu strace showsSIGSEGV {si_signo=SIGSEGV, si_code=1, si_addr=0x45454545}. - Repeated
/HNAP1/requests from one source with oversizedSOAPActionvalues, or a length sweep against the endpoint — the lab’s stage 2 sweeps offsets at 4- and 16-byte strides. - On the device: kernel or httpd logs for SIGSEGV in
cgibin,/var/log/messagescrash entries, and watchdog reboots under sustained probing.
SIEM / IDS rule (example):
| |
Remediation
| Action | Detail |
|---|---|
| Patch | None available or expected. The DIR-600L is end-of-life; D-Link SAP10393 states all DIR-600/605/605L revisions are EOS with no further firmware. Replace the device or move it to an isolated, untrusted segment. |
| Workaround | Do not expose the web management interface (or the HNAP endpoint) to WAN or untrusted LANs. Where the device must stay in service, put a reverse proxy or ingress ACL in front of it that caps request header size and rejects or truncates SOAPAction values longer than the 256-byte destination buffer (the lab’s effective mitigation is a front-end cap of 512 bytes on the whole header, well below the 260-byte crash threshold). |
| Config Hardening | Disable remote management, restrict port 80/443 to an administrative VLAN via firewall rules, monitor /HNAP1/ for oversized SOAPAction values and CGI child crashes, and treat any DIR-600L on the network as compromised-capable hardware awaiting retirement. |
References
- CVE-2026-129354 — NVD
- CVE-2026-129354 — CVE.org record
- VulDB 437417 — CVE-2026-129354
- VulDB CTI entry
- VulDB submission 1043526
- ruanyi101 — D-Link DIR-600L HNAP SOAPAction advisory
- D-Link SAP10393 — DIR-600/605/605L end-of-life statement
- googlesky/CVE-2026-129354 — source PoC repository
- captn3m0/dir-600l — independent firmware extraction / mirror
- D-Link
Notes
Auto-ingested from https://github.com/googlesky/CVE-2026-129354 on 2026-11-25.
Review verdict: this is a genuine exploit PoC, not a detector, scanner, audit kit or inventory tool. The repository ships a standalone full-chain exploit (exploit/exploit.py) plus a stdlib-only driver (poc/poc.py) that triggers the overflow on the real vendor binary, reproduces the advisory crash signature, and demonstrates saved return address control with an attacker-chosen program counter. It also provides a bounded-shim differential as the remediation shape and a 0-day sweep of adjacent HNAP entry conditions. Copied files are the exploit driver, the lab front end, the firmware fetch/extraction script, the shim, the container build files, three captured evidence runs and the upstream README; the .git directory, the fetched firmware blobs, the excluded TRACKING.md working record and the build caches were not copied.
License: MIT (Copyright (c) 2026 Lê Hiếu), included as LICENSE. Attribution to googlesky and to ruanyi (ruanyi101) for the original advisory is preserved.
Limitations: the PoC is lab-only and drives the container re-host of the firmware under qemu-mipsel rather than physical hardware. The demonstrated primitive is memory corruption with instruction-pointer control; no shellcode or arbitrary command execution payload is shipped, and exploiting the saved-$ra overwrite on real hardware additionally requires knowledge of the target’s memory layout and a suitable gadget or shellcode location. The offset was calibrated for this exact firmware image (DIR-600Bx_FW217b02.bin, htdocs/cgibin MD5 e7016496219d73b3be39cad163995fcc); other builds may differ. The container build needs outbound HTTPS to fetch the firmware and enforces its MD5. EPSS reported with the worklist record is 0.01444. Category was chosen as network rather than the supplied binary hint: the affected asset is a router management interface and the attack vector is a remote unauthenticated HTTP request, matching the archive’s convention for router firmware overflows. The sibling CVE-2026-129353 (authentication.cgi) is out of scope for this entry and has its own archive entry. Run only against devices you own or have written authorization to test.
| |