ZeroHour

CVE-2021-27137

KEV PoC ×4large

Unauthenticated Stack-Based Buffer Overflow in DD-WRT UPnP (SSDP M-SEARCH)

CISA: DD-WRT Stack-Based Buffer Overflow Vulnerability

CVSS 3.1
8.1 high
EPSS
4%p90
Published
()
KEV added
AI analysis

DD-WRT firmware before build 45724 contains a stack-based buffer overflow (CWE-121) caused by an unsafe strcpy in the UPnP handling code (ssdp_msearch in router/upnp/src/ssdp.c). An unauthenticated remote attacker can trigger it by sending a crafted SSDP M-SEARCH request to a UPnP-enabled interface, overflowing an internal fixed buffer. Successful exploitation can crash the router or allow code execution and full device compromise, consistent with the high confidentiality, integrity and availability impacts in the 8.1 CVSS score. Exposure is limited because UPnP is disabled by default and, by default, listens only on internal interfaces, so risk is concentrated on DD-WRT routers where UPnP has been enabled and on networks where an attacker has LAN access. The flaw was added to CISA's Known Exploited Vulnerabilities catalog on 2026-07-21, has public proofs of concept, and is reportedly being exploited in the wild by the C0XMO IoT botnet (a Gafgyt variant) to propagate and remove rival malware.

What to do: Upgrade affected DD-WRT routers to build 45724 or later. If upgrading is not immediately possible, disable UPnP, or verify that UPnP/SSDP is bound only to internal interfaces and that UDP port 1900 (SSDP) and M-SEARCH traffic are not reachable from the WAN. Per the CISA KEV required action, apply mitigations in line with BOD 26-04 guidance, and check any internet-exposed DD-WRT device for signs of compromise (e.g., unexpected botnet traffic) if UPnP was enabled.

Affected
DD-WRT firmwareAll builds before 45724
Estimated exposure
large≈ hundreds of thousands of DD-WRT routers, of which only the subset with UPnP enabled is actually exploitable — No authoritative install counts exist, but DD-WRT is one of the most widely used third-party consumer router firmwares with a long-running community install base historically estimated in the hundreds of thousands to millions of devices,…

Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.

Description

An issue was discovered in router/upnp/src/ssdp.c in DD-WRT before 45724. An unsafe strcpy in the UPnP handling functionality allows an unauthenticated remote attacker to send a request that would overflow an internal fixed buffer. Exploitation requires the DD-WRT user to enable UPnP (which is off by default, and only listens on internal interfaces by default). This occurs in ssdp_msearch (reachable by an M-SEARCH request).

CISA Known Exploited Vulnerability
Affected
DD-WRT DD-WRT
Required action
Apply mitigations in accordance with vendor instructions, ensuring compliance with CISA’s BOD 26-04 Prioritizing Security Updates Based on Risk (see URL in Notes) guidance and CISA’s “Forensics Triage Requirements” (see URL in Notes). Follow applicable BOD 26-04 guidance for cloud services or discontinue use of the product if mitigations are unavailable. Stakeholders are responsible for evaluating each asset's internet exposure and ensuring adherence to BOD 26-04 patching guidelines.
Due date
Ransomware use
Unknown
Vendors
dd-wrt
Products
dd-wrt
Weakness
CWE-121
Vector
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H

In the news