Skip to content
CVE 2026 129354

CVE 2026 129354

github.com • November 15, 2026

The HNAP handler derives the action it executes from the client-supplied SOAPAction header. Its pre-authentication whitelist is a substring test — any header that merely contains or …/GetWLanRadios passes without credentials — and the action actually used is everything after the last slash of that same attacker-controlled header. The action string is then copied into a 256-byte stack buffer with an unbounded strcpy (and re-formatted through an unbounded sprintf shell-command template). One request from an unauthenticated LAN-side (or exposed-WAN-management) client corrupts the CGI child's stack; this laboratory proves the chain end to end on the real firmware binary — the exact MD5-verified image the upstream advisory recorded — re-hosted under qemu-mipsel with boa's CGI execution model: advisory-matching crash ( 0x45454545 ), crash threshold, and saved-return-address control ( faulting PC = 0x42424242 ).

main ( 0x00402a30 ) dispatches on the basename of argv[0] ; boa maps /HNAP1/ to /usr/sbin/hnap -> /htdocs/cgibin , selecting hnap_main ( 0x00412a48 ). Ghidra 12.1.4 decompilation of the shipped binary:

Two independent defects make the overflow pre-authentication reachable:

the whitelist is strstr — a substring match on the whole header, so " " satisfies it while the checked name and the used action are different strings (the upstream advisory's observation);

the action used downstream is strrchr(soap, '/') + 1 — the tail after the last slash, fully attacker-controlled, of unbounded length.

The saved $ra sits 236 bytes above the destination buffer. Consequences, all reproduced in this lab: 'E' fill ≥ ~260 bytes faults at si_addr=0x45454545 (exactly the upstream advisory's strace signature); a fill of NUL-free pointers into the always-mapped uClibc text region keeps every intermediate dereference alive so the 236-byte offset lands on the saved $ra , and the returning jr ra jumps to the attacker-chosen address ( 0x42424242 in the PoC) — instruction-pointer control, one step beyond the public advisory's evidence, which itself noted a PC/RA snapshot was still missing.

2. Reproduction environment

The DIR-600L is end-of-life: D-Link's SAP10393 states all DIR-600/605/605L revisions are EOL/EOS with no further firmware. No vendor patch exists or will exist, so there is no "fixed version" to build. The differential in this laboratory instead contrasts the shipped binary against the same binary with the two dangerous libc entry points interposed by lab/shim/bndshim.c — a freestanding mipsel .so with no DT_NEEDED that loads under the firmware's own ld-uClibc.so.0 and bounds every strcpy / sprintf destination at the affected buffer (256). The shim is a remediation shape, not a vendor patch : it demonstrates that the crash is exactly the unbounded copy and nothing else. On real hardware the only available mitigations are retiring the device or strictly isolating its management interface.

Provenance of the binary, verified twice: the firmware image DIR-600Bx_FW217b02.bin (md5 2f953ec274caeab6bc643045da56ab29 , matching the hash recorded in the upstream research advisory) is downloaded at image build, its vendor-LZMA squashfs is unpacked with sasquatch , and the resulting htdocs/cgibin (md5 e7016496219d73b3be39cad163995fcc ) is byte-identical to an independent researcher's committed extraction of the same image. The front end ( lab/service.py ) reproduces boa's CGI model for HNAP — one child per request, SOAPAction mapped to HTTP_SOAPACTION , the URL in REQUEST_URI , the body on stdin, /var/run/hnap.lock creatable — so a guest crash is a reported SIGSEGV with its si_addr , not a service outage.

3. Running the environment

Single mode against one side:

poc/poc.py (stdlib only; check / exploit / probe / mitigation ):

check — one over-long whitelisted-prefixed SOAPAction ; classifies the target by the child's exit status and si_addr . Exit 1 vulnerable, 0 safe, 3 no worker, 2 unreachable.

exploit — stage 1 repeats the advisory's evidence ( 'E' fill → 0x45454545 ); stage 2 sweeps a pointer-preserving suffix to locate the saved- $ra offset and proves instruction-pointer control with a 0x42424242 marker.

probe — whitelist, quoting, method, header-shape and length matrix: both whitelist entries, whitelist-name-as-suffix (substring match), quoted vs unquoted, GET vs POST, absent header, and the strrchr -misses edge case.

mitigation — there is no vendor mitigation to test (EOL); the mode demonstrates the front-end header cap as the effective mitigation and contrasts the shim side.

Captured runs: evidence/check-*-run.txt , evidence/exploit-*-run.txt , evidence/probe-*-run.txt , evidence/mitigation-*-run.txt , evidence/versions.txt , evidence/0day-sweep.txt .

6. Environment preconditions

Podman (or Docker) with network-creation rights; the lab creates cve129354lab and bounds every container to --cpus 2 --memory 4g .

Outbound HTTPS at image build (firmware download from the public mirror; MD5 enforced — an unmatched image aborts the build).

The vulnerable code runs only inside the container's chroot; nothing executes on the host. The firmware belongs to D-Link and is fetched at build time, never committed.

7. Additional findings (0-day sweep on the fixed line)

The HNAP surface was swept with every whitelist-bypass form reachable from the decompilation — both whitelist entries, the whitelist name embedded mid-header (pure substring match), an Authorization header present, double-slash variants, GET and POST, quoted and unquoted — at 500-byte suffixes, on both sides of the differential ( evidence/0day-sweep.txt ):

every form that reaches hnap_main with an over-long action crashes on the shipped binary at 0x45454545 and runs clean on the remediated side;

no form produced a memory-corruption signature that survives the bounds shim — i.e. no distinct unfixed path beyond CVE-2026-129354 itself.

The sibling login-handler overflow in the same binary is CVE-2026-129353, reproduced with its own laboratory in CVE-2026-129353 ; the remaining *_main handlers of htdocs/cgibin were swept there and show no input-length-dependent corruption.

CVE record —

VulDB entry —

Upstream research advisory (ruanyi101) —

D-Link EOL statement (SAP10393) —

Firmware image (independent public mirror of the vendor file, MD5-matched) —