Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2026-129351 — Reproduces CVE-2026-129351, a pre-auth out-of-bounds write in TRENDnet TEW-657BRM mini_httpd, running the hash-verified MIPS firmware under qemu with a PoC and bounds-shim differential. | Kitploit
Tools/GitHubGitHub/googlesky/cve-2026-129351
Embedded Systems SecurityMemory ForensicsVulnerability AnalysisExploitationReverse EngineeringHardware & IoT SecurityPapers & ResearchFirmware AnalysisBinary Exploitation
GitHubgooglesky/cve-2026-129351

CVE-2026-129351

4 days agoNot yet reviewed
Share

Reproduces CVE-2026-129351, a pre-auth out-of-bounds write in TRENDnet TEW-657BRM mini_httpd, running the hash-verified MIPS firmware under qemu with a PoC and bounds-shim differential.

View RepositoryWebsite

CVE-2026-129351 — TRENDnet TEW-657BRM mini_httpd pre-auth out-of-bounds write: the .htm redirect sprintf smashes the GOT

License: MIT Research status: validated

CVECVE-2026-129351 (VDB-437416 family, VulDB)
ComponentTRENDnet TEW-657BRM v1.0R, firmware 1.00.1 — /usr/sbin/mini_httpd, request-line handling (.htm → setup.cgi redirect)
AffectedTEW-657BRM v1.0R firmware 1.00.1 — EOL, no vendor fix will be released
Fixed innothing; the product is end-of-life. This repository's differential uses a bounds-enforcing remediation instead (see §2)
CWECWE-787 (Out-of-bounds Write), CWE-120 (Classic Buffer Overflow)
ImpactPre-authentication memory corruption of the web-management daemon with an attacker-controlled corrupted GOT pointer; crash of the per-connection child (the daemon keeps serving) and, per the upstream research notes, program-counter control in their emulation
VectorNetwork, unauthenticated — one HTTP request whose URL path contains .htm (and no .cgi) and is longer than ~3.9 KB
TriggerGET /AAAA…(≥3887 bytes)….htm — the redirect sprintf writes past a ~3.9 KB .bss buffer into the process GOT
Creditruanyi (VulDB user ruanyi101) — original research advisory (emulated-evidence disclosure); this laboratory reproduces it on the vendor's hash-verified firmware image

mini_httpd rewrites any URL path that contains .htm (and does not contain .cgi) into a setup.cgi redirect before it ever looks at the Authorization header. The rewrite is a single unbounded sprintf into a fixed .bss buffer at 0x100001bc; the process GOT begins at 0x10001110, 3908 bytes later. One unauthenticated request with a ~3.9 KB path overwrites GOT entries with attacker bytes — the next library call or data dereference runs through the corrupted slot. This laboratory runs the real firmware daemon (MIPS big-endian, hash-verified image) under qemu-mips in a firmware chroot, binding its HTTP port itself exactly as on the device, and proves the chain: the pre-auth crash, the length threshold at exactly the buffer→GOT distance, and an attacker-controlled faulting pointer whose address bytes are the attacker's own payload.


1. Root cause

mini_httpd's request handler (Ghidra 12.1.4 decompilation of the shipped binary, function at 0x00403d84):

/* path = the request URL path */
pcVar7 = strstr(path, ".cgi");
if ((pcVar7 == NULL) && (pcVar7 = strstr(path, ".htm")) != NULL) {
    if (*path == '/') path = path + 1;
    sprintf(&DAT_100001bc, "/setup.cgi?next_file=%s", path);   /* sink */
    path = &DAT_100001bc;
}
...
/* the Authorization header is parsed AFTER the redirect rewrite:
   strncasecmp(header, "Authorization:", 14) ... */

Three facts make the write pre-auth and attacker-sized:

  • the trigger is a substring test — .htm anywhere in the path (.html qualifies too, as the sweep shows) and no .cgi;
  • the rewrite happens before the Authorization header is examined — no credentials are needed;
  • the destination DAT_100001bc is a fixed .bss buffer ≈ 3.9 KB in size, and the GOT starts at 0x10001110 — 0x100001bc + 3908. Every byte past that boundary lands in a GOT slot.

Reproduced consequences (see evidence/): a 3800-byte path is served normally; at the 3887-byte boundary the child faults (SIGSEGV/ SIGBUS); with a controlled two-byte fill pattern at the boundary the faulting address itself carries the payload bytes — 'a'*3887+'b'*64 faults at 0x6261e27a, 'c'*3887+'d'*64 faults at 0x6463e47c — proving the corrupted GOT data pointer is attacker-controlled. The upstream research notes additionally document program-counter control and a benign payload in their emulation; the first-called GOT slot differs across environments, so this laboratory claims the pointer-control primitive it can attribute.

2. Reproduction environment

serviceimagerole
tew-vulncve-2026-129351:lab with LAB_BOUNDS_SHIM=0the firmware rootfs (extracted at build from the hash-verified vendor image) chroot'd, with the real mini_httpd running under qemu-mips-static in foreground on port 8080
tew-fixedcve-2026-129351:lab with LAB_BOUNDS_SHIM=1the same daemon with LD_PRELOAD=/usr/lib/bndshim.so (bounds-enforcing sprintf, cap 2048)
poccve-2026-129351-poc:localstdlib-only Python driver

The TEW-657BRM is end-of-life; no vendor patch exists or will exist. The differential therefore contrasts the shipped daemon against the same binary with the dangerous sprintf interposed by lab/shim/bndshim.c — a freestanding mips (big-endian) .so with no DT_NEEDED that loads under the firmware's own ld-uClibc.so.0 and bounds the redirect destination at 2048 bytes (well under the 3908-byte buffer→GOT distance; every legitimate redirect is under 100 bytes). This is a remediation shape, not a vendor patch.

Unlike a CGI harness, here the daemon itself is the target: mini_httpd accepts, forks a child per connection, and the child performs the vulnerable rewrite — so a crash kills only the connection child and the parent keeps accepting, exactly as on the device. A small log endpoint (lab/logtail.py) exposes the tail of the qemu -strace log so the PoC can attribute guest signals to its own requests and read si_addr.

Provenance: the firmware package TEW-657BRMv1.0R(1.00.1).zip (md5 0e2104c9259073e0a1e3bbdb6d740840) is fetched at image build from TRENDnet's download server; the inner TEW-657BRM-1001.img (md5 5dda131b6226e8c87c26aeafb0b19aba) contains ad1006.bin (md5 5dc8a55bfe7a31702e43f56a09e1d46b), whose vendor sqlz (squashfs 2.1 big-endian LZMA) filesystem is magic-swapped to the standard sqsh and unpacked with sasquatch. usr/sbin/mini_httpd is hash-gated (md5 1a026bd17b528f64d84b740f84efc817).

3. Running the environment

./run-lab.sh build     # firmware fetch+verify, extraction, lab + PoC images
./run-lab.sh up        # cve129351lab network, tew-vuln, tew-fixed
./run-lab.sh sweep     # check / exploit / probe / mitigation on both sides
./run-lab.sh down

Single mode against one side:

podman run --rm --network cve129351lab cve-2026-129351-poc:local \
    exploit --host=tew-vuln

4. The PoC

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

  • check — one over-long .htm request; classifies the target by the new guest signal in the daemon's strace. Exit 1 vulnerable, 0 safe, 3 no worker, 2 unreachable.
  • exploit — stage 1 repeats the threshold crash; stage 2 lands a two-fill pattern at the GOT boundary and proves the faulting pointer is attacker-controlled (si_addr bytes equal the payload bytes).
  • probe — length threshold (3800 / 3887 / 4000 / 8000), .html variant, query suffix, .cgi dominance, HEAD method, and post-crash service health.
  • mitigation — EOL device: demonstrates the front-end request-line cap as the effective form and contrasts the shim side.

5. Expected results

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    936
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    555
  • 3

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    353
  • 4

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    348
  • 5

    looking-glass

    anonghosty/looking-glass

    CSIRT platform that ingests Shadowserver reports into MongoDB and replays them as interactive maps, analysis, findings, advisories and executive dashboards.

    336
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    288

Explore all tools

Browse our collection of tools

View all tools →