Skip to main content

Free 30-min security demo  — We'll scan your real code and show live findings, no commitment Book Now

Offensive360
ZeroDays CVE-2026-15694
High CVE-2026-15694 CVSS 8.8 Tenda BE12 Pro Router Firmware C

Stack Buffer Overflow in Tenda BE12 Pro SetIpBind

CVE-2026-15694 exposes a remotely exploitable stack-based buffer overflow in Tenda BE12 Pro firmware, enabling unauthenticated RCE on affected routers.

Offensive360 Research Team
Affects: 16.03.66.23
Source Code

Overview

CVE-2026-15694 is a stack-based buffer overflow vulnerability residing in the fromSetIpBind function of the Tenda BE12 Pro router firmware, version 16.03.66.23. The flaw is triggered through the page parameter supplied to the /goform/SetIpBind HTTP endpoint, which is exposed on the router’s local management interface. Because many Tenda routers are misconfigured with WAN-facing management panels, or are reachable from a compromised LAN segment, the attack surface extends well beyond the immediate local network.

The vulnerability was identified through security research and a public proof-of-concept exploit has already been released, meaning the window for exploitation against unpatched devices is open right now. Tenda BE12 Pro routers are mid-range Wi-Fi 7 capable devices deployed in small-to-medium business and home-office environments, making this a meaningful target for attackers seeking persistent network footholds.

This class of bug — unchecked strcpy or sprintf into fixed-size stack buffers within GoAhead or custom httpd CGI handlers — is endemic to low-cost embedded routers. The Tenda firmware stack in particular has a long history of similar findings across its product line, suggesting that the root issue is a systemic lack of bounds checking in the CGI parameter-handling layer rather than an isolated coding error.

Technical Analysis

The vulnerable function fromSetIpBind is a CGI handler registered for the /goform/SetIpBind route inside the router’s embedded HTTP server. When a POST or GET request arrives, the handler extracts named query parameters and copies them into local stack-allocated character arrays without validating input length.

The specific sink is the page parameter. A representative reconstruction of the vulnerable logic, consistent with patterns seen across the Tenda firmware family extracted via binwalk and analyzed with a disassembler, looks like this:

// Vulnerable: fromSetIpBind handler (reconstructed from firmware analysis)
#define PAGE_BUF_SIZE 64

void fromSetIpBind(void) {
    char page_buf[PAGE_BUF_SIZE];  // Fixed-size stack buffer
    char bindList[256];
    char *page_param;

    // Retrieve the 'page' parameter from the HTTP request
    page_param = websGetVar(wp, "page", "");

    // UNSAFE: no length check before copy — attacker controls page_param length
    strcpy(page_buf, page_param);  // ← Stack-based buffer overflow here

    // Further processing of bindList and pagination logic follows...
    snprintf(bindList, sizeof(bindList), "%s", websGetVar(wp, "list", ""));
    // ...
}

The call to strcpy(page_buf, page_param) copies attacker-supplied data from the HTTP request directly into a 64-byte stack buffer with no preceding length validation. An attacker supplying a page value longer than 63 bytes (plus null terminator) will overwrite adjacent stack memory. With sufficient crafting, this allows overwriting the saved return address on the stack.

On MIPS-based Tenda firmware (the architecture used in BE12 Pro), exploitation is further aided by the common absence of stack canaries (-fno-stack-protector is a frequent compile-time default in vendor SDKs) and inconsistent ASLR entropy. The executable stack and RWX memory regions present in many of these firmware images lower the bar for turning a stack overflow into reliable arbitrary code execution. An attacker can inject shellcode directly in the overflow payload or use a ROP chain targeting known gadgets in the firmware binary to achieve OS-level command execution running as root, since the httpd process typically runs with full privileges.

Impact

A remote attacker with network access to the management interface — TCP port 80 or 443 on the LAN, or the WAN interface if remote management is enabled — can send a single crafted HTTP request to /goform/SetIpBind with an oversized page parameter and achieve unauthenticated arbitrary code execution as root on the router.

Practical consequences include:

  • Persistent backdoor implantation: The attacker can write to NVRAM or modify startup scripts to survive reboots.
  • Traffic interception and DNS hijacking: Full control of the routing table and DNS resolver settings enables man-in-the-middle attacks against all connected clients.
  • Lateral movement: The compromised router serves as a pivot point into the LAN, bypassing perimeter defenses entirely.
  • Botnet recruitment: Devices like this are routinely absorbed into Mirai-variant botnets for DDoS campaigns.

The CVSS 8.8 score reflects the Network attack vector, Low attack complexity, No privileges required, and No user interaction required — a combination that makes this highly attractive for automated exploitation. With a public proof-of-concept already circulating, exploitation is not theoretical.

How to Fix It

For end users and network administrators:

  1. Check firmware version: Navigate to http://<router-ip>/goform/SysToolFirmware or the administration panel and confirm whether you are running version 16.03.66.23.
  2. Disable remote management immediately: Ensure WAN-side HTTP/HTTPS management access is disabled. On Tenda devices this is typically found under Advanced → Security → Remote Management.
  3. Apply vendor patches: Monitor https://www.tenda.com.cn/ for a patched firmware release and apply it as soon as one becomes available.
  4. Restrict LAN access: If management panel access from all LAN hosts is not required, restrict it using ACLs or VLAN segmentation.

For Tenda firmware developers — the correct remediation pattern:

// Fixed: fromSetIpBind handler with bounds-checked copy
#define PAGE_BUF_SIZE 64

void fromSetIpBind(void) {
    char page_buf[PAGE_BUF_SIZE];
    char bindList[256];
    char *page_param;

    page_param = websGetVar(wp, "page", "");

    // SAFE: validate length before copy
    if (page_param == NULL || strlen(page_param) >= PAGE_BUF_SIZE) {
        websError(wp, 400, "Invalid page parameter");
        return;
    }

    // strncpy with explicit limit, ensure null termination
    strncpy(page_buf, page_param, PAGE_BUF_SIZE - 1);
    page_buf[PAGE_BUF_SIZE - 1] = '\0';

    snprintf(bindList, sizeof(bindList), "%s", websGetVar(wp, "list", ""));
    // ...
}

Beyond this specific fix, the vendor should audit all CGI handlers across the firmware for the same strcpy/sprintf-into-fixed-buffer pattern, enable stack canaries (-fstack-protector-strong) in the SDK build flags, enforce ASLR at the OS level, and implement a secure-by-default policy that disables remote management on factory reset.

Our Take

This vulnerability is a textbook example of a problem the embedded firmware industry has failed to solve for over two decades. Stack-based buffer overflows from unsanitized HTTP parameters are trivially detectable with even basic static analysis, yet they continue to ship in production router firmware at scale. The Tenda BE12 Pro is a current-generation, Wi-Fi 7 device — there is no technical justification for the absence of strncpy, stack canaries, or parameter validation in 2026.

For enterprises, the lesson is operational: consumer and SMB-grade routers should be treated as untrusted devices, segmented from critical infrastructure, and subjected to the same vulnerability management lifecycle as any other network appliance. The existence of a public PoC means that any unpatched BE12 Pro reachable from the network is an active liability today, not a future risk.

From a DAST perspective, this finding also underscores the value of fuzzing HTTP parameter inputs on embedded management interfaces as a routine part of IoT security assessments. Simple length-boundary probes would have surfaced this crash immediately.

Detection with SAST

This vulnerability class maps to CWE-121: Stack-based Buffer Overflow, a child of CWE-119: Improper Restriction of Operations within the Bounds of a Memory Buffer.

In SAST analysis of C/C++ firmware code, Offensive360 flags the following patterns that directly correspond to this CVE:

  • Taint flow from HTTP parameter sources to strcpy/strcat/sprintf sinks: Any call path where websGetVar(), httpGetEnv(), or equivalent CGI input APIs feed unsanitized data into a non-size-bounded string function operating on a stack-allocated buffer.
  • Fixed-size stack array declarations adjacent to unbounded copy operations: Static analysis can identify when the destination buffer size is a compile-time constant while the source length is runtime-variable with no preceding guard.
  • Absence of strlen/strnlen guards before copy: When no length validation exists between the taint source and the copy sink in the same function scope.

Our SAST engine models data flow interprocedurally, which is essential here — the parameter extraction and the overflow may occur across multiple call frames. Rules in this category are classified under our Memory Safety / Buffer Management policy set and are assigned high confidence when the taint path is direct and the destination is stack-allocated.

References

#buffer-overflow #iot #embedded #rce

Detect this vulnerability class in your codebase

Offensive360 SAST scans your source code for CVE-2026-15694-class vulnerabilities and thousands of other patterns — across 60+ languages.