CVEReports
CVEReports

Automated vulnerability intelligence platform. Comprehensive reports for high-severity CVEs generated by AI.

Product

  • Home
  • Dashboard
  • Sitemap
  • RSS Feed

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 CVEReports. All rights reserved.

Made with love by Amit Schendel & Alon Barad



CVE-2026-20408
8.80.01%

Airborne Toxic Event: The MediaTek WLAN Heap Overflow (CVE-2026-20408)

Amit Schendel
Amit Schendel
Senior Security Researcher

Feb 26, 2026·6 min read·5 visits

PoC AvailableCISA KEV Listed

Executive Summary (TL;DR)

A critical zero-click RCE in MediaTek Wi-Fi drivers allows attackers within radio range to compromise devices via malformed packets. Affects OpenWrt, Aruba, and generic MediaTek SDK implementations.

CVE-2026-20408 is a critical heap-based buffer overflow in the MediaTek WLAN SDK that allows adjacent attackers to execute arbitrary code with kernel privileges. Affecting a wide range of devices from OpenWrt routers to enterprise Aruba access points, this 'zero-click' vulnerability resides in the handling of wireless management frames. By broadcasting a malformed packet, an attacker can corrupt heap memory, bypass security mechanisms, and gain full control over the device without any user interaction.

The Signal in the Noise

If you've ever wondered why security researchers are paranoid about what's flying through the air, look no further than CVE-2026-20408. This isn't your garden-variety SQL injection sitting behind a WAF; this is a vulnerability that lives in the very air you breathe—or rather, the radio waves your laptop and router breathe. The target? The MediaTek WLAN SDK, the beating heart of millions of Wi-Fi devices, including the popular OpenWrt ecosystem and enterprise-grade gear like Aruba.

The vulnerability is a classic Heap-based Buffer Overflow (CWE-122) manifesting as an Out-of-bounds Write (CWE-787). In simple terms, the driver—running with the highest possible privileges (kernel mode)—blindly trusts the size of the data it receives from the air. It's the digital equivalent of a nightclub bouncer letting in a crowd of 500 people into a room with a fire capacity of 50.

What makes this particularly juicy for an attacker is the vector: Adjacent (AV:A). You don't need to be on the victim's VPN. You don't need their Wi-Fi password. You just need to be in the parking lot with a decent antenna. It is a 'zero-click' exploit, meaning the victim does nothing but exist.

The Flaw: Trusting the Untrustworthy

Deep down in the MediaTek driver code, specifically within the routines handling OID (Object Identifier) requests and 802.11 management frames, lies a fatal logic error. The driver is responsible for parsing frames that dictate how the Wi-Fi card behaves. These frames contain variable-length data fields.

The root cause is a failure to sanitize the length of incoming data before performing a memory copy operation. When the driver receives a packet, it reads a length field specified by the attacker. Instead of validating that this length fits into the destination buffer allocated on the heap, the driver says, "Sure, looks good to me," and initiates a memcpy (or NdisMoveMemory).

> [!NOTE] > Heap vs. Stack: This is a heap overflow, not a stack overflow. Stack overflows are often easier to exploit for simple return-address overwrites (ROP chains). Heap overflows are more complex; they require "grooming" the heap to ensure that when you write past the end of your buffer, you overwrite something critical—like a function pointer in a neighboring object or a net_device structure—rather than just empty garbage data.

The Code: Anatomy of a Crash

Let's look at a reconstruction of the vulnerable logic. While the exact proprietary source code isn't public, the mechanics described in the patch analysis (Patch ID: WCNCR00461651) paint a clear picture. The code likely looked something like this:

// VULNERABLE LOGIC RECONSTRUCTION
int mt76_process_oid(struct mt76_dev *dev, void *data, u32 len) {
    // 1. Allocate a fixed-size buffer on the heap (e.g., 1024 bytes)
    u8 *heap_buffer = kmalloc(1024, GFP_KERNEL);
    if (!heap_buffer) return -ENOMEM;
 
 
    // 2. THE BUG: Copying 'len' bytes without checking if len > 1024
    // 'len' is controlled by the attacker via the packet size
    memcpy(heap_buffer, data, len);
 
 
    // ... process data ...
    kfree(heap_buffer);
    return 0;
}

See the issue? The len parameter comes from the user/attacker. If len is 4096, the memcpy will blast 3072 bytes of data past the end of heap_buffer, overwriting whatever poor kernel structures live next door.

The fix is painfully simple: adding a bounds check.

// PATCHED LOGIC
int mt76_process_oid(struct mt76_dev *dev, void *data, u32 len) {
    // 1. Define the limit
    #define MAX_CMD_LEN 1024
 
 
    // 2. THE FIX: Validate length before allocation/copy
    if (len > MAX_CMD_LEN) {
        pr_err("mt76: invalid OID length %d\n", len);
        return -EINVAL;
    }
 
 
    u8 *heap_buffer = kmalloc(MAX_CMD_LEN, GFP_KERNEL);
    if (!heap_buffer) return -ENOMEM;
 
 
    memcpy(heap_buffer, data, len);
    // ...
}

The Exploit: Grooming the Heap

Exploiting this isn't just about sending a big packet; it's an art form. To turn a crash (DoS) into Remote Code Execution (RCE), the attacker needs to perform Heap Grooming (also known as Heap Feng Shui). The goal is to manipulate the kernel heap layout so that a valuable object is placed immediately after our vulnerable buffer.

Here is the theoretical attack chain:

  1. Spraying: The attacker sends multiple legitimate packets that cause the kernel to allocate objects of a specific size, filling up the holes in the heap.
  2. The Hole: The attacker triggers the freeing of one of these objects, creating a "hole" of a known size.
  3. The Victim Object: The attacker triggers an action that allocates a target object (e.g., a structure containing a function pointer) into a slot adjacent to the hole.
  4. The Trigger: The attacker sends the malformed management frame. The vulnerable driver allocates the buffer into the "hole" we prepared.
  5. The Overflow: The memcpy runs, overflowing the buffer and overwriting the function pointer in the Victim Object with the address of our shellcode (or a ROP gadget).

The Impact: Why You Should Care

We aren't talking about stealing cookies here. This is kernel-level execution. If an attacker succeeds, they effectively become the hardware. They can install persistent backdoors in the firmware that survive reboots. They can intercept all traffic passing through the router (passwords, banking data, love letters).

For enterprise environments using affected Aruba APs, this is a nightmare scenario. An attacker sitting in the lobby could compromise an Access Point, use it to pivot into the internal management VLAN, and move laterally through the corporate network. Because the attack happens at the 802.11 layer, traditional firewalls and IDS/IPS systems sitting at the network gateway will never even see the packet.

Mitigation: Patching the Airwaves

The remediation is straightforward but operationally painful: you need to update firmware. MediaTek released the fix in Patch ID WCNCR00461651.

For OpenWrt users, this means upgrading to a build that includes the patched mt76 driver (post-February 2026). If you are running a snapshot, opkg update && opkg upgrade might save you, but a full firmware flash is safer to ensure the kernel itself is aligned.

For Enterprise (Aruba, etc.) admins: You are at the mercy of your vendor's patch cycle. Check the February 2026 Security Bulletin immediately. If you cannot patch, your only real mitigation is physical security—keep unauthorized people out of radio range, which, let's be honest, is impossible.

> [!TIP] > Developer Takeaway: Never, ever trust a length field coming from an external source. Always validate len < sizeof(dest) before copying. Using safer APIs like memcpy_s (if available) or explicit bounds checking is mandatory.

Official Patches

MediaTekProduct Security Bulletin February 2026

Fix Analysis (1)

Technical Appendix

CVSS Score
8.8/ 10
CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
EPSS Probability
0.01%
Top 100% most exploited

Affected Systems

MediaTek SDK (Release 7.6.7.2 and prior)OpenWrt (Versions 19.07, 21.02, 23.05)Aruba Networks APs (Specific models with MediaTek chips)Ubiquiti/Other vendors using MT7915/MT7986 chipsets

Affected Versions Detail

Product
Affected Versions
Fixed Version
MediaTek SDK
MediaTek
<= 7.6.7.2Post-Feb 2026 Release
OpenWrt
OpenWrt
19.07 - 23.05Snapshot Feb 2026
AttributeDetail
CWE IDCWE-787 (OOB Write)
Attack VectorAdjacent (AV:A)
CVSS Score8.8 (High)
PrivilegesKernel / Ring 0
ImpactRCE / Denial of Service
Exploit StatusPoC Expected

MITRE ATT&CK Mapping

T1211Exploitation for Defense Evasion
Defense Evasion
T1068Exploitation for Privilege Escalation
Privilege Escalation
T1203Exploitation for Client Execution
Execution
CWE-787
Out-of-bounds Write

The software writes past the end of the intended buffer in a heap-based memory region, capable of corrupting data, crashing the program, or executing code.

Known Exploits & Detection

Tencent Cloud AnalysisTheoretical analysis of MediaTek/Aruba heap overflow impact

Vulnerability Timeline

CVE Published by MediaTek
2026-02-02
Technical analysis published by Tencent Cloud
2026-02-03
Added to CISA Bulletin SB26-040
2026-02-09

References & Sources

  • [1]MediaTek Advisory
  • [2]NVD Entry
  • [3]CISA Weekly Bulletin

Attack Flow Diagram

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.