External risk intelligence

DD-WRT UPnP Buffer Overflow Vulnerability

CVE advisoryKnown Exploit

CVE-2021-27137

The vulnerability exists in the UPnP functionality of a router, which is disabled by default and, even when enabled, is designed to listen only on internal interfaces. While network-reachable in some configurations, it is not intended to be exposed to the public internet in standard deployment patterns.

Dd Wrt

Halo Surface Signal: 2 out of 5 — less likely to be public-facing.

External exposure likelihood

Horizon Alert

Summary of the vulnerability and why it matters

An issue in DD-WRT's UPnP handling could allow an attacker to overflow a buffer. This vulnerability, if exploited, could lead to code execution. The main concern is confirming relevance and exposure, as UPnP is off by default and typically listens only on internal interfaces.

  • Unauthenticated attackers can overflow a buffer.
  • This flaw can allow rival malware to spread.
  • Confirm relevance and exposure of UPnP usage.

Attack Path

How an attacker could exploit the issue

An attacker could exploit this vulnerability by sending a specially crafted request to a router running DD-WRT. If the router has Universal Plug and Play (UPnP) enabled, which is not the default, the attacker could trigger a buffer overflow. This overflow could lead to the execution of arbitrary code, allowing the attacker to compromise the device.

  • Requires UPnP to be enabled.
  • Triggered by an M-SEARCH request.
  • Can lead to remote code execution.

Live Threat

Current exploitation, exposure, and threat context

An unsafe buffer copy in the UPnP functionality could allow an unauthenticated remote attacker to cause a buffer overflow when the feature is enabled and accessible. This could affect the integrity and availability of the router's services.

  • Router system data at risk.
  • Unauthenticated remote request can trigger overflow.
  • Service disruption and potential code execution.

Operational Fix

Recommended remediation, mitigation, and detection steps

This vulnerability impacts DD-WRT router firmware with UPnP enabled, potentially affecting device owners and network administrators. The initial practical step is to determine if UPnP is active and if the affected interfaces are exposed externally. If so, identify the specific DD-WRT instances, assess their business criticality, and assign ownership for remediation.

  • Identify impacted DD-WRT devices.
  • Verify UPnP is enabled and exposed.
  • Plan remediation based on risk.

Supplementary metadata

Validate whether this threat affects your internet-facing exposure.

Halo Threat Intelligence helps prioritize remediation with Halo Surface Signal and H/A/L/O context. Start exposure validation with a free external attack surface trial.

Frequently asked questions

What is DD-WRT and how is it used?

DD-WRT is open-source firmware designed for wireless routers. Network administrators and enthusiasts use it to replace original manufacturer software, allowing for advanced networking features, custom configurations, and extended control over home or small business router hardware.

What is the CVE-2021-27137 vulnerability?

This is a buffer overflow, categorized as CWE-121. It occurs within the router's UPnP (Universal Plug and Play) service. Because the software does not safely copy incoming data into memory, a specially formatted network request can exceed the allocated space, potentially causing the device to crash or allowing unauthorized code execution.

How is this buffer overflow triggered?

An attacker triggers this by sending a crafted M-SEARCH request to the router. This only works if UPnP is actively enabled; if the feature is turned off, the vulnerable code path remains inactive. It is not triggered by standard web browsing or common router activities.

Is my device at risk for CVE-2021-27137?

Halo Surface Signal notes this is unlikely because UPnP is disabled by default and typically restricted to internal interfaces. You are primarily at risk if you have manually enabled UPnP and specifically configured the device to expose this service to the public internet rather than keeping it strictly internal.

What should I do if I use DD-WRT?

Your first step is to check your router's administration settings to verify if UPnP is enabled. If you do not require this feature for your applications, disable it immediately to eliminate the attack vector. If you must use UPnP, identify your firmware version and follow developer documentation to apply the relevant software updates.

References