CriticalCVE-2021-27137

    DD-WRT Stack-Based Buffer Overflow Vulnerability (CVE-2021-27137)

    Published Last modified In CISA KEV since Sources: CVE.org

    What is affected, what to do

    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).

    The vulnerability is being actively exploited; treat it as a priority. Update DD-WRT to version 45724. Immediate actions, mitigation and detection rules are in the runbook below.

    Affected
    • DD-WRT lt *..45724
    Fixed in
    • DD-WRT 45724

    Not sure whether and how you are affected? Ask a question about this vulnerability

    Metrics

    8.1

    Priority

    XIEM Effective CVSS: highest available CVSS rating from NVD and vendor data.

    Source: NVD, CVSS v3

    8.1

    CVSS v3

    Severity High on the scale from 0 to 10.

    Source: CVE.org

    4.0 %

    EPSS score

    Moderate — model estimates 1-10% exploitation likelihood.

    Source: FIRST EPSS, percentile 90.5

    Show all metrics
    Severity
    Critical
    Priority (0–325)

    The priority score is a consolidated metric that condenses several individual signals into a single, action-guiding ranking: technical severity (CVSS), exploitation likelihood (EPSS), known-exploited status (KEV) and the context of the affected asset. The aim is to answer the only truly important question in vulnerability management: what first?

    Read in glossary
    226.89 Methodology
    Exploit maturity

    An exploit is code or a technique that specifically uses a concrete vulnerability to force unintended behaviour — such as executing code or escalating privileges. It is the tool that turns a theoretical flaw into a practical attack.

    Read in glossary
    actively exploited
    XIEM Effective CVSS

    XIEM® is the tiered managed-security operating model from NEOSEC and a registered trademark of NEOSEC GmbH. It extends classic SIEM — the central collection, normalisation and correlation of security-relevant events — with endpoint forensics, network visibility and deception technology, and consolidates them into three building tiers: Sentry, Orchestrate and Command.

    Read in glossary
    8.1 Methodology
    CVSS v3

    CVSS is the globally established, open standard for assessing the technical severity of a vulnerability on a scale from 0 to 10. It describes how easily a flaw can be exploited and what damage it can cause — but not how likely its actual exploitation is. CVSS and the complementary EPSS deliberately answer different questions.

    Read in glossary
    8.1
    EPSS score

    The EPSS score is the absolute model output for an individual vulnerability: the estimated probability of real-world exploitation within the next 30 days, expressed as a value between 0 and 1 (i.e. 0 % to 100 %). A score of 0.42 means „the model estimates a 42 % chance of real-world exploitation within 30 days“.

    Read in glossary
    4.0 %
    Moderate — model estimates 1-10% exploitation likelihood.
    EPSS percentile

    The EPSS percentile is the relative position of a vulnerability within all EPSS-scored CVEs, expressed as a value between 0 and 1. A percentile of 0.90 means „this CVE has a higher EPSS score than 90 % of all other scored CVEs“. Unlike the EPSS score, it is not a probability — but a positioning within a ranking.

    Read in glossary
    90.5
    Critical — this CVE ranks in the top fifth of all CVEs scored today (rank ≥ 80%).
    KEV status

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary
    Actively exploited
    Published
    In CISA KEV since

    The KEV catalogue is a list maintained by the US authority CISA of vulnerabilities for which active exploitation in the wild has been confirmed. It answers not the question „how severe?“ but „is it already being attacked?“ — thereby sharply prioritising patching.

    Read in glossary
    CWE

    CWE is a catalogue of typical weakness types in software and hardware — such as flawed input validation, unsafe memory handling or poor authentication. Where a CVE names a concrete vulnerability in a concrete product, a CWE describes the underlying class of defect.

    Read in glossary
    CWE-121

    Response and mitigation

    Why act now?

    Prioritisation rationale

    This CVE landed on KEV because DD-WRT runs on hundreds of thousands of edge devices and offers an unauthenticated pre-auth RCE over UDP/1900 whenever UPnP is enabled — attackers use it mainly for botnet recruitment (Mirai-style, residential proxy nets) and as an initial pivot into flat SOHO or branch networks. The risk becomes acute where DD-WRT fronts KRITIS auxiliary sites, home-office setups with corporate VPN tunnels, or OT remote-maintenance perimeters. Because UPnP ships disabled by default, real-world exposure depends heavily on configuration: UPnP off means low exposure, UPnP active on WAN means immediate critical risk. Despite the elevated attack complexity in the CVSS vector, EPSS places this CVE among the highly likely to be exploited — patch or hard-disable UPnP within 72 h.

    1. Runbook step 1

      Immediate response (0-24 h)

      • Disable UPnP on every DD-WRT router immediately (Web UI → NAT/QoS → UPnP → Disable). Since UPnP is off by default, this is the fastest kill switch for CVE-2021-27137.
      • Upgrade firmware to DD-WRT build 45724 or later. Check current build under Administration → Management; download images from dd-wrt.com/site/support/router-database and verify the hash against the vendor release.
      • If patching cannot happen now, block UDP/1900 (SSDP) on WAN and on any untrusted internal segment via iptables (iptables -I INPUT -p udp --dport 1900 -j DROP). M-SEARCH packets are the trigger vector reaching ssdp_msearch.
      • Build an inventory of DD-WRT-based devices, including consumer hardware flashed with DD-WRT in branches, home-office routers tunnelling into corporate VPNs, and KRITIS auxiliary sites. These assets routinely fall outside central patch management.
      • Remove management interfaces (HTTP/HTTPS/SSH) of affected routers from the WAN and restrict them to a dedicated management VLAN to limit post-exploitation lateral access.
    2. Runbook step 2

      Mitigation layers

      • Network segmentation: DD-WRT routers must not have routing paths into production server VLANs. Egress filters at the upstream perimeter block reverse shells (outbound non-whitelisted ports).
      • IPS/firewall rule: drop SSDP M-SEARCH packets with oversized ST or MAN headers (> 256 bytes). Suricata idea: alert udp any any -> any 1900 (msg:"CVE-2021-27137 oversized SSDP M-SEARCH"; content:"M-SEARCH"; depth:8; dsize:>512; sid:1000001;).
      • Endpoint hardening: disable UPnP globally unless there is a documented business need. Where UPnP must run, bind it strictly to internal, trusted interfaces (DD-WRT: upnpd -L on br0 only, never vlan2/WAN).
      • IAM/access control: enforce strong credentials and RADIUS-backed 2FA on router admin accounts so that a compromised router cannot pivot via credential reuse into AD.
      • Config baseline: use Ansible/rConfig to centrally verify that the UPnP service is disabled and no ssdp listener is bound to external interfaces (netstat -lnp | grep 1900).
      • Lifecycle: devices without an upgrade path (end-of-life hardware with no 45724 build) must enter a replacement plan; NIS2 requires documented risk treatment for such legacy systems.
    3. Runbook step 3

      Detection rules

      • Network telemetry (Zeek): alert on UDP/1900 packets > 500 bytes or M-SEARCH with non-RFC-conformant headers. Filter event ssdp_message for oversized payloads.
      • IDS/Suricata: enable Emerging Threats signatures covering SSDP buffer overflows; custom rule triggering on content:"M-SEARCH"; pcre:"/[^\r\n]{400,}/";.
      • Router syslog: forward ssdp/upnpd process crashes (Segmentation fault, child process ... killed) to the SIEM via remote syslog; repeated upnpd restarts are a strong exploitation indicator.
      • EDR/flow analysis: correlate unusual outbound connections originating from the router itself (SSH, reverse TCP on high ports toward the Internet) after an M-SEARCH burst. KQL sketch: NetworkEvents | where SrcIp in (RouterAssets) | where DstPort !in (53,123,443) | where TimeGenerated > ssdp_event_time.
      • Config drift monitoring: daily diff of router configuration; unexpected UPnP enablement, new iptables rules, or newly created user accounts open a ticket.

    Detection rules

    No NEOSEC detection rule is available for this vulnerability yet.

    Classification under NIS2 and CRA

    Rule-based classification from exploitation status and severity. It does not replace a case-by-case assessment.

    NIS2

    NIS2 is EU Directive (EU) 2022/2555 to raise the level of cybersecurity across the Union. It substantially broadens obligations compared with the first NIS directive: more sectors, mandatory risk management, staged reporting duties and personal accountability of senior management.

    Read in glossary
    Actively exploited: treat the vulnerability as a priority in vulnerability handling under Art. 21(2)(e) NIS2. If it is exploited in your environment, check the reporting obligation under Art. 23 (early warning within 24 hours).
    CRA

    The CRA is EU Regulation (EU) 2024/2847 setting horizontal cybersecurity requirements for „products with digital elements“ — from industrial controllers and software to connected consumer devices. For the first time manufacturers must ensure security across the entire product lifecycle, handle vulnerabilities and provide security updates.

    Read in glossary
    Since 11.09.2026, manufacturers of affected products with digital elements must report actively exploited vulnerabilities under Art. 14 CRA, with an early warning within 24 hours via ENISA's single reporting platform.
    ISO/IEC 27001

    ISO/IEC 27001 is the internationally leading standard for an information security management system (ISMS). It describes a risk-based, process-oriented framework to systematically plan, implement, review and improve information security.

    Read in glossary
    Control A.8.8, management of technical vulnerabilities: assess relevance to your systems, plan remediation and keep evidence.

    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).

    Source: CISA KEV Catalog, cvelistv5, NVD (NIST)

    Affected products

    The following versions are affected. Older releases of the same product line are also vulnerable unless stated otherwise.

    Affected products
    Affected versionsFixed in
    DD-WRTDD-WRT
    • < 45724
    • 45724

    Vendors and products

    Affected operating systems

    Affected operating systems
    Otherdd-wrtdd-wrt—

    Weakness classes (CWE)

    • CWE-121Stack-based Buffer Overflow

      Variant

      A stack-based buffer overflow condition is a condition where the buffer being overwritten is allocated on the stack (i.e., is a local variable or, rarely, a parameter to a function).

      Entry at MITRE CWE-121

    Public exploit references

    Publicly reported proof-of-concepts, exploit modules and detection templates for this vulnerability. NEOSEC links to the original sources only and does not provide any exploit code.

    Public exploit references
    CISA KEV CatalogCISA Known Exploited Vulnerability (opens in a new tab)cisa.govactively exploited

    References & sources

    Changes to this CVE

    Who changed this CVE and when: NVD (analysis, affected products, CVSS), the CVE publisher (CNA) and additional providers such as CISA (ADP).

    1. Record modifiedCISA ADP

      CISA assessment (SSVC): exploitation: active, automatable: no

      Show the original change
      Individual changes of this event as published by NVD
      TypeActionBeforeAfter
      SSVC assessmentchanged
      {"id":"CVE-2021-27137","role":"CISA Coordinator","options":[{"exploitation":"active"},{"automatable":"no"},{"technicalImpact":"total"}],"version":"2.0.3","timestamp":"2026-07-21T15:45:25.742968Z"}
      {"id":"CVE-2021-27137","role":"CISA Coordinator","options":[{"exploitation":"active"},{"automatable":"no"},{"technicalImpact":"total"}],"version":"2.0.3","timestamp":"2026-07-21T00:00:00+00:00"}

      Source identifier: 134c704f-9b21-4f2e-91b3-4a467353bcc0

    2. Initial analysis by NVDNVD

      Show 8 original changes
      Individual changes of this event as published by NVD
      TypeActionBeforeAfter
      Product configurationadded
      —
      OR *cpe:2.3:o:dd-wrt:dd-wrt:*:*:*:*:*:*:*:* versions up to (excluding) 45724
      Reference typeadded
      —
      MITRE: https://securityaffairs.com/193290/uncategorized/iot-botnet-c0xmo-adds-competitor-killing-capability.html Types: Exploit, Third Party Advisory
      Reference typeadded
      —
      MITRE: https://ssd-disclosure.com/ssd-advisory-dd-wrt-upnp-buffer-overflow/ Types: Exploit, Third Party Advisory
      Reference typeadded
      —
      MITRE: https://svn.dd-wrt.com/changeset/45724 Types: Patch
      Reference typeadded
      —
      MITRE: https://www.bleepingcomputer.com/news/security/c0xmo-botnet-spreads-via-dd-wrt-router-flaw-kills-rival-malware/ Types: Exploit, Third Party Advisory
      Reference typeadded
      —
      MITRE: https://www.fortinet.com/blog/threat-research/inside-cross-platform-propagation-of-new-gafgyt-variant-c0xmo Types: Exploit
      Reference typeadded
      —
      CISA-ADP: https://ssd-disclosure.com/ssd-advisory-dd-wrt-upnp-buffer-overflow/ Types: Exploit, Third Party Advisory
      Reference typeadded
      —
      CISA-ADP: https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-27137 Types: US Government Resource

      Source identifier: nvd@nist.gov

    3. Record modifiedCISA ADP

      CISA assessment (SSVC): exploitation: active, automatable: no

      Show 2 original changes
      Individual changes of this event as published by NVD
      TypeActionBeforeAfter
      Referenceadded
      —
      https://www.cisa.gov/known-exploited-vulnerabilities-catalog?field_cve=CVE-2021-27137
      SSVC assessmentchanged
      {"id":"CVE-2021-27137","role":"CISA Coordinator","options":[{"exploitation":"poc"},{"automatable":"no"},{"technicalImpact":"total"}],"version":"2.0.3","timestamp":"2026-07-16T18:24:17.054985Z"}
      {"id":"CVE-2021-27137","role":"CISA Coordinator","options":[{"exploitation":"active"},{"automatable":"no"},{"technicalImpact":"total"}],"version":"2.0.3","timestamp":"2026-07-21T15:45:25.742968Z"}

      Source identifier: 134c704f-9b21-4f2e-91b3-4a467353bcc0

    4. CISA KEV entry updated9119a7d8…

      4 individual changes: Date Added, Due Date, Required Action, Vulnerability Name

      Show 4 original changes
      Individual changes of this event as published by NVD
      TypeActionBeforeAfter
      Date Addedadded
      —
      2026-07-21
      Due Dateadded
      —
      2026-07-21
      Required Actionadded
      —
      2026-07-21
      Vulnerability Nameadded
      —
      2026-07-21

      Source identifier: 9119a7d8-5eab-497f-8521-727c672e3725

    Linked advisories

    Embed badge

    Show the severity and KEV status of this vulnerability on your site – with a link back here. The image is updated hourly.

    Badge preview for CVE-2021-27137
    <a href="https://intel.neosec.eu/en/cve/CVE-2021-27137"><img src="https://intel.neosec.eu/badge/cve/CVE-2021-27137.svg?lang=en" alt="CVE-2021-27137 – NEOSEC Intel" height="20"></a>