CVE-2021-27137 is a stack-based buffer overflow in the UPnP SSDP code of DD-WRT, the open-source Linux router firmware: a crafted M-SEARCH request with an oversized uuid overflows a 128-byte buffer. You are affected if a router runs a DD-WRT build older than SVN changeset 45724 with UPnP switched on. CISA lists it as exploited in the wild.
Vulnerability summary
CVSS base score
8.1
High severity
EPSS score (FIRST)
4.0%
Probability of exploitation in the wild in the next 30 days
CISA KEV catalog
Yes
Listed as known exploited
Published
Vulnerability ID: CVE-2021-27137 · Source: NVD (MITRE CNA Secondary score only, not NVD Primary)
Affected components
| Component | CPE | Version range |
|---|---|---|
| DD-WRT (open-source router firmware) | cpe:2.3:o:dd-wrt:dd-wrt:*:*:*:*:*:*:*:* | before SVN changeset 45724 (fixed in changeset 45724); includes third-party devices such as some Buffalo routers shipping DD-WRT |
What does this mean for affected devices?
CVE-2021-27137 is a stack-based buffer overflow (CWE-121) in router/upnp/src/ssdp.c of DD-WRT, the open-source Linux firmware that many router owners and some router makers flash onto consumer and small-office hardware. NVD's record says an unsafe strcpy in ssdp_msearch lets an unauthenticated remote attacker overflow a fixed internal buffer with an M-SEARCH request, and that exploitation needs UPnP to be enabled, which is off by default and listens only on internal interfaces by default (NVD).
Affected and fixed versions. NVD's CPE data marks every DD-WRT build before revision 45724 as affected. The fix is a one-line change committed on 9 February 2021: the copy of the ST: uuid: value into the name buffer became a bounded strlcpy(name, st, sizeof(name)) (DD-WRT changeset 45724). The SSD Secure Disclosure write-up names the destination as a 128-byte buffer and shows a proof of concept that overwrites a saved return address (SSD Advisory).
Score. As of 14 November 2026, NVD shows the record as Analyzed with one CVSS v3.1 metric, 8.1 (High, AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H), submitted by MITRE as a Secondary score; NVD lists no Primary metric of its own (NVD).
Exploitation. CISA added CVE-2021-27137 to the Known Exploited Vulnerabilities catalog on 21 July 2026 with a due date of 24 July 2026, and its note says the flaw sits in a component used by different products, so owners should check each vendor's patch status (CISA KEV). Fortinet's FortiGuard Labs report of 3 June 2026 describes the Gafgyt variant C0XMO spreading by sending oversized ST:uuid: values to UDP port 1900 on vulnerable DD-WRT routers (Fortinet). FIRST EPSS scores it 0.03995 (90.7th percentile) on 13 November 2026 (FIRST EPSS).
What a device maker should do. If your product ships a DD-WRT-derived image, check that the build includes revision 45724 or later, search your firmware for the unbounded copy in ssdp.c, keep UPnP disabled in the factory default, and publish an updated image with the revision number in the release notes. An SBOM of the firmware makes this check repeatable: SoftWSP extracts the components of a firmware image into a CycloneDX 1.6 SBOM and matches them against NVD, CISA KEV and FIRST EPSS, with an AI-drafted, cited report that an engineer reviews.
Evidence
- An unsafe strcpy in ssdp_msearch (router/upnp/src/ssdp.c) lets an unauthenticated remote attacker overflow a fixed buffer with an M-SEARCH request; UPnP is off by default and listens only on internal interfaces by default; DD-WRT before 45724 is affected. — NVD
- As of 2026-11-14 the NVD record is Analyzed with a single CVSS v3.1 8.1 Secondary metric from MITRE and no NVD Primary metric. — NVD
- Changeset 45724 (2021-02-09) replaces strcpy(name, st) with strlcpy(name, st, sizeof(name)) in src/router/upnp/src/ssdp.c. — DD-WRT changeset 45724
- Unbounded copy of user data into a 128-byte buffer; proof of concept overwrites a return address; UPnP disabled by default. — SSD Advisory
- Added to CISA KEV on 2026-07-21, due 2026-07-24; ransomware use Unknown; note says the flaw affects a component used by different products. — CISA KEV
- The Gafgyt variant C0XMO spreads by exploiting CVE-2021-27137 with oversized ST:uuid: values in M-SEARCH requests to UDP port 1900 (report dated 2026-06-03). — Fortinet FortiGuard Labs
- EPSS 0.03995, 90.7th percentile, dataset 2026-11-13. — FIRST EPSS

Related advisories
Sources
Frequently asked questions
Is my DD-WRT router affected by CVE-2021-27137?
It is affected if it runs a DD-WRT build older than revision 45724 and UPnP has been enabled. NVD's CPE data marks all builds before 45724 as vulnerable, and NVD notes that UPnP is off by default and listens only on internal interfaces by default.
What did the DD-WRT fix change?
Changeset 45724, committed on 9 February 2021, replaced the unbounded strcpy of the ST: uuid: value with strlcpy(name, st, sizeof(name)) in src/router/upnp/src/ssdp.c, so an oversized value can no longer overrun the buffer.
Is CVE-2021-27137 exploited in the wild?
Yes. CISA added it to the Known Exploited Vulnerabilities catalog on 21 July 2026, and Fortinet's FortiGuard Labs report of 3 June 2026 documents the Gafgyt variant C0XMO spreading through it with crafted M-SEARCH requests to UDP port 1900.
Why does this page show 8.1 rather than an NVD score?
As of 14 November 2026, the only CVSS metric on the NVD record is a CVSS v3.1 8.1 Secondary score submitted by MITRE. NVD has published no Primary metric of its own for this CVE.
Questions about this page?