Security Advisory

CVE-2021-35393: Realtek wscd UPnP Stack Overflow

Last updated:
  • CVE-2021-35393

CVE-2021-35393 is a stack buffer overflow in wscd, the WiFi Simple Config UPnP daemon of Realtek's Jungle SDK, reached through the Callback header of a UPnP SUBSCRIBE or UNSUBSCRIBE request. NVD scores it 9.8 because remote unauthenticated attackers can run code. It is not in CISA KEV. Ship firmware with Realtek's wsc patch.

Vulnerability summary

CVSS base score

9.8

Critical severity

EPSS score (FIRST)

66.4%

Probability of exploitation in the wild in the next 30 days

CISA KEV catalog

No

Not listed

Published

Vulnerability ID: CVE-2021-35393 · Source: NVD

Affected components

ComponentCPEVersion range
Realtek Jungle SDK (rtl819x) WiFi Simple Config daemon (wscd, mini_upnpd)cpe:2.3:a:realtek:rtl819x_jungle_software_development_kit:*:*:*:*:*:*:*:*2.0 up to and including 3.4.14b (NVD); Realtek lists rtl819x-SDK-v3.2.x, v3.4.x, v3.4T, v3.4T-CT and rtl819x-eCos-v1.5.x, fixed by wsc patch archives dated 2021-06-22, 2021-07-05 and 2021-07-01 (Realtek advisory 2021-08-15)
Zyxel WAP6804, NBG6615, NBG-418N v2, WAP3205 v3—Fixed in WAP6804 V1.00(ABKH.9)C0, NBG6615 V1.00(ABMV.6)C0, NBG-418N v2 V1.00(AARP.11)C0, WAP3205 v3 V2.00(ABDM.5)C0; P-330W, X150N, NBG-2105, NBG-416N and NBG-418N end of life (Zyxel advisory, revised 2021-09-16)
D-Link routers, access points and DSL gateways built on the Realtek SDK (DIR-615, DIR-815, DIR-825, DAP-1530, DAP-1610, DSL-124, DSL-224 and others)—Per hardware revision; e.g. fixed in DIR-615 T2 v20210930, DIR-615 Z1 v1.0.2_WW_Hotfix, DIR-815 D1 v4.11WWB01, DIR-825 G1 v7.12B01; DIR-842 R1 and DIR-825 R1 end of life (D-Link SAP10253)

What does this mean for affected devices?

CVE-2021-35393 is in the "WiFi Simple Config" server of the Realtek Jungle SDK, which NVD describes as implementing "both UPnP and SSDP protocols"; the binary is "usually named wscd or mini_upnpd and is the successor to miniigd". NVD says the server "is vulnerable to a stack buffer overflow vulnerability that is present due to unsafe parsing of the UPnP SUBSCRIBE/UNSUBSCRIBE Callback header" and that exploitation "allows remote unauthenticated attackers to gain arbitrary code execution on the affected device" (NVD). NVD's Primary score is 9.8, CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H, with CWE-787 (out-of-bounds write). The CNA, MITRE, published no score, and the CVE record carries no CISA ADP score. ONEKEY's own advisory rated the UPnP stack overflow 8.1 (AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H) under the swapped number described below.

Which Realtek SDK versions are affected?

NVD's CPE configuration covers cpe:2.3:a:realtek:rtl819x_jungle_software_development_kit from 2.0 up to and including 3.4.14b, matching its description of "Realtek Jungle SDK version v2.x up to v3.4.14B". Realtek's AP-Router SDK advisory, released on 2021-08-15 for CVE-2021-35392 to CVE-2021-35395, lists rtl819x-SDK-v3.2.x, v3.4.x, v3.4T and v3.4T-CT plus rtl819x-eCos-v1.5.x as affected. ONEKEY (then IoT Inspector), which reported the flaws, adds in its advisory that the 2.x branch is no longer supported by Realtek and that the separate "Luna" SDK is fixed in version 1.3.2a. ONEKEY shows the cause in the GetIPandPortandCallBack function: it copies the port part of a Callback URL such as <http://192.168.1.2:1234/> into a 10-byte stack buffer with memcpy and no length check, so a long port string overflows the stack. The UPnP HTTP interface is the one wscd announces in SSDP replies, for example http://hostname:52881/simplecfg.xml. Note on numbering: Realtek's advisory and NVD give the stack overflow to CVE-2021-35393 and the heap overflow to CVE-2021-35392. ONEKEY's original advisory, and D-Link's SAP10253 which copies its labels, list the two the other way round, so map findings by the Realtek or NVD description, not by the researcher's label.

Which devices are affected?

Realtek's advisory names SDK series, not products, so the model list comes from each device maker. Zyxel's WiFi Simple Config advisory covers CVE-2021-35392 and CVE-2021-35393 together and names four models and the fixed firmware version for each, with target dates between the end of October and the end of November 2021: WAP6804 V1.00(ABKH.9)C0, NBG6615 V1.00(ABMV.6)C0, NBG-418N v2 V1.00(AARP.11)C0 and WAP3205 v3 V2.00(ABDM.5)C0. It states that the P-330W, X150N, NBG-2105, NBG-416N and NBG-418N from the researcher's report are end of life and receive no update, and recommends replacing them; its last revision is dated 2021-09-16. D-Link's support announcement SAP10253 covers all four Realtek SDK CVEs by hardware revision. For the two wscd CVEs it lists DIR-615 T2 firmware v20210930 ("CVE-2021-35392/93: Download & Update device"), and fixed firmware for DIR-615 Z1 (v1.0.2_WW_Hotfix), DIR-815 D1 (v4.11WWB01), DIR-825 G1 (v7.12B01), DAP-1530 B1, DAP-1610 B1, DSL-124 R1 and DSL-224 R1 and S1. It marks DIR-842 R1 and DIR-825 R1 as end of life, and for many other DIR and DSL revisions names Q4 2021 as the release target, with rows last updated in September or October 2021; check D-Link's current download page for those. ONEKEY's report lists close to 200 device fingerprints from at least 65 vendors found through SSDP replies on UDP 1900, which is a researcher inventory, not a vendor statement.

How do you fix CVE-2021-35393?

Realtek does not publish a new SDK release for this. Its advisory names patch archives that the chip customer gets through Realtek and that cover CVE-2021-35392, CVE-2021-35393 and CVE-2021-35394 together: 20210622_sdk_3.2.3_wsc_binary_and_mp_daemon_patch, 20210622_sdk_3.4.11E_wsc_binary_and_mp_daemon_patch, 20210705_sdk-v3.4t_pre5_wsc_binary_and_mp_daemon_patch, 20210622_sdk-v3.4t_pre7_wsc-upnp-mp and 20210701_ecosV1.5.3_patch_for_fixing_vulnerabiits. A device owner only gets the fix when the device maker rebuilds its firmware, so install the vendor firmware for the exact model and hardware revision, and replace end-of-life units. Where a product does not need UPnP or WPS, disable wscd and keep its UPnP HTTP port (52881 in ONEKEY's example) and UDP 1900 closed on WAN interfaces. Our Realtek SDK vulnerabilities guide shows how to identify the SDK branch and the wscd binary in an image, and the memory corruption fix guide covers bounded copies of network input.

Is CVE-2021-35393 exploited?

It is not in the CISA KEV catalog as of 2026-11-19 (catalog version 2026.11.18). FIRST EPSS gives it 0.66387, the 99.3rd percentile, in the 2026-11-18 dataset (CISA KEV, FIRST EPSS). Two sibling flaws from the same Realtek advisory are KEV-listed: the UDPServer command injection CVE-2021-35394 and the boa web server flaws CVE-2021-35395. The other wscd flaw is CVE-2021-35392, the heap overflow in SSDP M-SEARCH handling, and the older Realtek miniigd UPnP flaw that wscd replaced is CVE-2014-8361.

How to fix this class of issueThis advisory's weakness class is Memory corruption. Our practical guide covers how to detect, fix, verify and disclose it: How to fix memory corruption in embedded firmware.

Evidence

  • NVD: status Analyzed; [email protected] Primary CVSS 3.1 9.8 AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H (v2 10.0); CWE-787; CPE rtl819x_jungle_software_development_kit 2.0 to 3.4.14b inclusive; published 2021-08-16; read from cached API response 2026-11-19. — NVD
  • Realtek AP-Router SDK Advisory (2021-08-15): affected rtl819x-SDK-v3.2.x, v3.4.x, v3.4T, v3.4T-CT, rtl819x-eCos-v1.5.x; wscd stack buffer overflow (CVE-2021-35393) via UPnP SUBSCRIBE/UNSUBSCRIBE Callback header and heap buffer overflow (CVE-2021-35392) via SSDP NOTIFY crafted from M-SEARCH ST header; patches 20210622_sdk_3.2.3, 20210622_sdk_3.4.11E, 20210705_sdk-v3.4t_pre5, 20210622_sdk-v3.4t_pre7_wsc-upnp-mp, 20210701_ecosV1.5.3. — Realtek
  • ONEKEY (IoT Inspector) advisory 2021-08-15: stack buffer overflow via UPnP SUBSCRIBE Callback header, GetIPandPortandCallBack memcpy of port into char port[10] without bound; labels CVE-2021-35392 as UPnP stack overflow and CVE-2021-35393 as SSDP heap overflow, each rated 8.1 AV:N/AC:H; Jungle SDK v3.0-v3.4T-CT and 2.x affected, Luna fixed in 1.3.2a; SSDP Location example http://hostname:52881/simplecfg.xml. — ONEKEY
  • Zyxel advisory for CVE-2021-35392/35393: fixed WAP6804 V1.00(ABKH.9)C0, NBG6615 V1.00(ABMV.6)C0, NBG-418N v2 V1.00(AARP.11)C0, WAP3205 v3 V2.00(ABDM.5)C0; P-330W, X150N, NBG-2105, NBG-416N, NBG-418N end of life; revisions 2021-08-16, 2021-08-26, 2021-09-16. — Zyxel
  • D-Link SAP10253: covers CVE-2021-35392 to 35395 (labels copied from IoT Inspector); DIR-615 T2 v20210930 'CVE-2021-35392/93: Download & Update device'; fixed FW DIR-615 Z1 v1.0.2_WW_Hotfix, DIR-815 D1 v4.11WWB01, DIR-825 G1 v7.12B01, DAP-1530 B1, DAP-1610 B1, DSL-124 R1, DSL-224 R1/S1; DIR-842 R1, DIR-825 R1 EOL; others Q4 2021 target. — D-Link
  • CVE record (CNA MITRE, state PUBLISHED, published 2021-08-16): no CNA score, problem type n/a; only the CVE Program ADP container, no CISA ADP score. — CVE.org
  • CISA KEV catalog version 2026.11.18: CVE-2021-35393 not listed; checked 2026-11-19. — CISA KEV
  • EPSS 0.66387, percentile 0.99297, dataset 2026-11-18, read 2026-11-19. — FIRST EPSS

Related advisories

Sources

  1. NVD
  2. Realtek AP-Router SDK Advisory (CVE-2021-35392/35393/35394/35395), 2021-08-15
  3. ONEKEY: Multiple issues in Realtek SDK affect hundreds of thousands of devices down the supply chain
  4. Zyxel Security Advisory for WiFi Simple Config Buffer Overflow Vulnerabilities
  5. D-Link SAP10253: D-Link Devices affected by Realtek Chipset RTL8xxx Realtek SDK vulnerabilities
  6. CVE.org record CVE-2021-35393 (CNA: MITRE)
  7. CISA KEV
  8. FIRST EPSS

Frequently asked questions

What causes CVE-2021-35393?

The WiFi Simple Config daemon (wscd or mini_upnpd) parses the Callback header of UPnP SUBSCRIBE and UNSUBSCRIBE requests unsafely, which overflows a stack buffer and lets a remote unauthenticated attacker run code (per NVD and the Realtek AP-Router SDK advisory). ONEKEY traced it to a memcpy of the Callback URL's port into a 10-byte stack buffer (per ONEKEY's advisory).

Why does ONEKEY call CVE-2021-35393 a heap overflow?

ONEKEY's advisory and D-Link's SAP10253 label CVE-2021-35393 as the SSDP heap overflow and CVE-2021-35392 as the UPnP stack overflow. Realtek and NVD assign them the other way round: CVE-2021-35393 is the UPnP Callback stack overflow (per the Realtek AP-Router SDK advisory and NVD).

Which Zyxel and D-Link models need a firmware update for CVE-2021-35393?

Zyxel names WAP6804, NBG6615, NBG-418N v2 and WAP3205 v3 with fixed firmware and lists P-330W, X150N, NBG-2105, NBG-416N and NBG-418N as end of life (per Zyxel's WiFi Simple Config advisory). D-Link lists models by hardware revision, for example DIR-615 T2 fixed in v20210930 and DIR-815 D1 in v4.11WWB01, with DIR-842 R1 and DIR-825 R1 end of life (per D-Link SAP10253).

Is CVE-2021-35393 exploited in the wild?

It is not in the CISA KEV catalog as of 2026-11-19 (catalog version 2026.11.18). FIRST EPSS gives it 0.66387, the 99.3rd percentile, in the 2026-11-18 dataset (per CISA KEV and FIRST EPSS).