# CVE-2021-27137: DD-WRT Stack-Based Buffer Overflow

> An unauthenticated remote attacker can execute arbitrary code via a buffer overflow in UPnP handling if UPnP is enabled.

- **Severity:** High 8.1 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Yes, since 21 Jul 2026 (CISA KEV)
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 16 Jul 2026
- **Updated:** 22 Jul 2026
- **Also known as:** GHSA-qx3v-2jx6-8m2c

## What is CVE-2021-27137?

CVE-2021-27137 is a high-severity memory corruption vulnerability in DD-WRT, published on 16 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.

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

Weakness: CWE-121 (Stack-based Buffer Overflow)

## Which versions are affected by CVE-2021-27137?

It affects 1 product.


Products: Dd-Wrt Dd-Wrt.

## How do I fix CVE-2021-27137?

No fix has been published for CVE-2021-27137 yet. Limit exposure of the affected software until one is available. US federal agencies must fix it by 24 Jul 2026.

## Is CVE-2021-27137 being exploited?

Yes. Attackers have exploited CVE-2021-27137 in the wild since at least 21 Jul 2026.

## Other vulnerabilities in DD-WRT

- [CVE-2020-13976](https://insights.sbomify.com/CVE-2020-13976/): Command injection in n/a (high 8.8)
- [CVE-2012-6297](https://insights.sbomify.com/CVE-2012-6297/): Command injection in n/a (high 8.8)
- [CVE-2009-2765](https://insights.sbomify.com/CVE-2009-2765/): Command injection in n/a (high 8.3)
- [CVE-2009-2766](https://insights.sbomify.com/CVE-2009-2766/): Missing authorization in n/a (high 7.5)
- [CVE-2008-6974](https://insights.sbomify.com/CVE-2008-6974/): Cross-site request forgery in n/a (medium 6.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-27137 and fix it if it is affected.

What it is: CVE-2021-27137 is a high-severity memory corruption vulnerability in DD-WRT, published on 16 Jul 2026. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: Yes. Attackers have exploited CVE-2021-27137 in the wild since at least 21 Jul 2026.

Affected product: DD-WRT. No package-level version data is available, so check the vendor advisory linked from the reference page.

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2021-27137/ (Markdown: https://insights.sbomify.com/CVE-2021-27137/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2021-27137
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2021-27137
- OSV: https://osv.dev/vulnerability/CVE-2021-27137

---
From sbomify Insights: https://insights.sbomify.com/CVE-2021-27137/
Summaries are generated and may contain mistakes; the official description above is the record.
