CVE DatabaseCVE-2021-27137
한국어 권고문 →
CVE-2021-271378.1/HIGHCISA KEVCWE-121

DD-WRT UPnP SSDP Buffer Overflow Vulnerability (CVE-2021-27137) Analysis and Mitigation Guide

Affected Vendors
dd-wrt
Affected Components
dd-wrt
Published Date
2026-07-16

Executive & SecOps Summary

SECOPS ASSESSMENT
Affected Scope

DD-WRT firmware versions before build 45724 with UPnP functionality enabled

Impact

Unauthenticated remote attackers can execute arbitrary code or cause a Denial of Service (DoS) by sending crafted SSDP M-SEARCH requests, with active exploitation by botnets (e.g., c0xmo) confirmed in the wild [1, 2, references]

Mitigation

Immediately upgrade DD-WRT firmware to build 45724 or later, and disable UPnP services until the patch is applied [1, references]

Affected Products & Version Scope

DD-WRT firmware builds prior to 45724 (only when UPnP is enabled)

Remediation & Live Workaround Commands

PATCH & WORKAROUND

1. Firmware Upgrade (Recommended)

Apply the official patch by upgrading your DD-WRT router to build 45724 or later, which replaces unsafe string operations with bounded alternatives [references].

2. Temporary Mitigation (If patching is not immediately possible)

Since UPnP is disabled by default in DD-WRT, ensure it is turned off if it was previously enabled.

Via DD-WRT Web GUI:

  • Log in to the DD-WRT Web Administration interface.
  • Navigate to NAT / QoS -> UPnP.
  • Set UPnP Service to Disable.
  • Click Save and then Apply Settings.

Via Command Line Interface (SSH/Telnet):

bash
# Disable UPnP service and commit changes
nvram set upnp_enable=0
nvram commit

# Terminate the running UPnP daemon
killall upnpd
Recommended Security Control & Mitigation Partner
NordLayer / Zero-Trust Network Access
Due to active exploitation by IoT botnets, immediately disable UPnP or upgrade your DD-WRT firmware to a secure build.

Stop Exposing VPN Ports to the Internet — Switch to Zero-Trust Access

Eliminate public-facing VPN concentrators and firewall management ports with identity-first Zero-Trust Network Access.

90% Attack Surface Reduction · Hardware-Free

Technical Root Cause & Exploitation Mechanics

This vulnerability (CVE-2021-27137) is a stack-based buffer overflow (CWE-121) residing in the UPnP (Universal Plug and Play) handling component (router/upnp/src/ssdp.c) of the DD-WRT open-source router firmware.

Root Cause & Exploit Mechanics

  • Unsafe String Copy: The vulnerability exists within the ssdp_msearch function, which processes incoming Simple Service Discovery Protocol (SSDP) discovery requests. The function utilizes the unsafe strcpy function to copy user-controlled input into a fixed-size internal stack buffer without validating the input length.
  • Attack Vector: An attacker can transmit a specially crafted SSDP M-SEARCH request over UDP port 1900. By supplying an overly long header value, the attacker overflows the stack buffer, allowing them to overwrite the return address and hijack the control flow.
  • In-the-Wild Exploitation: This vulnerability is actively exploited and listed on the CISA KEV catalog. Threat actors, including Gafgyt variants like the c0xmo botnet, leverage this flaw to compromise IoT devices, propagate malware, and terminate competing botnet processes on infected routers [references].

Official Vendor Advisories & References

SecOps Advisory Dispatch & RSS Feed

Subscribe to Daily Vulnerability Briefings & KEV Alerts

Concise morning briefings for SecOps, DevSecOps, and SRE teams covering newly exploited CVEs and mitigation priorities.

Slack / Teams / RSS Feed: