CVE-2021-35394 — Realtek Jungle SDK Remote Code Execution Vulnerability

CVE-2021-35394

Realtek Jungle SDK — Multiple Memory Corruption and Command Injection Flaws in UDPServer Enabling Unauthenticated RCE Across Hundreds of Router Models

What is the Realtek Jungle SDK?

Realtek Semiconductor produces the WiFi and networking chipsets embedded in hundreds of millions of consumer and enterprise networking devices. The Realtek Jungle SDK (Software Development Kit) provides the software stack that device manufacturers integrate into their router and IoT products built on Realtek chipsets. Device brands including Asus, Belkin, D-Link, Edimax, Hama, Logitec, Netis, Sercomm, ZTE, and dozens of others have shipped products based on the Realtek Jungle SDK. Vulnerabilities in the SDK affect all of these devices simultaneously — creating a massive, difficult-to-patch attack surface across the consumer IoT ecosystem.

Overview

CVE-2021-35394 encompasses multiple memory corruption and command injection vulnerabilities in the Realtek Jungle SDK's UDPServer component — a diagnostic service process that listens on UDP ports. An unauthenticated attacker on the same network (or with internet access if the UDP port is exposed) can send specially crafted diagnostic packets to trigger buffer overflows, a NULL byte write primitive, or direct command injection, achieving root-level code execution on any device running the vulnerable SDK. IoT Inspector Research Lab discovered these vulnerabilities and disclosed them publicly in August 2021. Multiple Mirai botnet variants incorporated these vulnerabilities for mass device recruitment.

Affected Versions

Context Details
Realtek Jungle SDK Multiple versions with the UDPServer component
Affected device brands Asus, Belkin, D-Link, Edimax, Hama, Logitec, Netis, Sercomm, ZTE, and many others
Device types Home routers, WiFi extenders, IP cameras, IoT devices
Patch availability Depends on OEM manufacturer — Realtek released patches; OEM firmware updates vary

Technical Details

The Realtek Jungle SDK includes a UDPServer process (also called mp_debug_server) that handles diagnostic commands sent via UDP. This process contains multiple vulnerabilities:

  • Buffer overflow (CVE-2021-35394 primary): The UDPServer processes incoming diagnostic packets without adequate length validation — attacker-controlled packet data overflows stack or heap buffers, enabling arbitrary code execution
  • NULL byte write: A specific packet type writes a NULL byte to an attacker-controlled memory address, providing a controlled write primitive
  • Command injection: A diagnostic command type passes packet data directly to a system() call without sanitization, allowing direct shell command injection
  • No authentication required: UDP diagnostic packets are processed without any authentication
  • Attack reach: If the UDP port is exposed to WAN (many consumer router configurations inadvertently expose it), internet-accessible exploitation is possible

Discovery

Discovered by researchers at IoT Inspector Research Lab (Dr. Florian Lukavsky and team) during a systematic security audit of Realtek SDK-based devices. The research identified 14 affected OEM device families. IoT Inspector coordinated disclosure with Realtek but OEM patch delivery remains inconsistent.

Exploitation Context

Mirai botnet variants rapidly incorporated CVE-2021-35394 after public disclosure, scanning the internet for vulnerable Realtek-based devices and recruiting them into DDoS botnets. By 2022, researchers observed millions of exploitation attempts per month against devices using the Realtek Jungle SDK. The breadth of affected devices — spanning dozens of brands and millions of deployed units — makes this one of the most impactful SDK-level supply chain vulnerabilities in IoT history.

Remediation

  1. Check for firmware updates from your specific router or IoT device manufacturer that address Realtek SDK vulnerabilities
  2. If no patch is available: disable remote management (WAN-side access to the device's web interface and diagnostic ports)
  3. Place the affected device behind an upstream router or firewall that blocks external access to UDP diagnostic ports
  4. Consider replacing EOL devices that will never receive firmware updates addressing this vulnerability
  5. Monitor for signs of device compromise: unexpected network traffic, changes to DNS settings, or unusual CPU usage
  6. Network operators: deploy firewall rules blocking UDP traffic on common Realtek diagnostic ports (UDP 9034 and similar) at network boundaries

Key Details

PropertyValue
CVE ID CVE-2021-35394
Vendor / Product Realtek — Jungle Software Development Kit (SDK)
NVD Published2021-08-16
NVD Last Modified2025-11-07
CVSS 3.1 Score9.8
CVSS 3.1 VectorCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
SeverityCRITICAL
CISA KEV Added2021-12-10
CISA KEV Deadline2021-12-24
Known Ransomware Use No

CVSS 3.1 Breakdown

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Required Action

CISA BOD 22-01 Deadline: 2021-12-24. Apply updates per vendor instructions.

Timeline

DateEvent
2021-08-16IoT Inspector publishes research on Realtek SDK vulnerabilities; CVE published
2021-12-10Added to CISA Known Exploited Vulnerabilities catalog
2021-12-24CISA BOD 22-01 remediation deadline