# CVE-2021-3512: Auth bypass in Buffalo broadband routers

> Remote unauthenticated attackers can bypass access restrictions to enable telnet and execute arbitrary OS commands with root privileges on Buffalo routers.

- **Severity:** High 8.8 (`CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 28 Apr 2021
- **Updated:** 3 Aug 2024
- **Also known as:** GHSA-m7x4-xmjq-8hxp

## What is CVE-2021-3512?

CVE-2021-3512 is a high-severity authentication bypass vulnerability in Buffalo broadband routers, published on 28 Apr 2021. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

Improper access control vulnerability in Buffalo broadband routers (BHR-4GRV firmware Ver.1.99 and prior, DWR-HP-G300NH firmware Ver.1.83 and prior, HW-450HP-ZWE firmware Ver.1.99 and prior, WHR-300HP firmware Ver.1.99 and prior, WHR-300 firmware Ver.1.99 and prior, WHR-G301N firmware Ver.1.86 and prior, WHR-HP-G300N firmware Ver.1.99 and prior, WHR-HP-GN firmware Ver.1.86 and prior, WPL-05G300 firmware Ver.1.87 and prior, WZR-450HP-CWT firmware Ver.1.99 and prior, WZR-450HP-UB firmware Ver.1.99 and prior, WZR-HP-AG300H firmware Ver.1.75 and prior, WZR-HP-G300NH firmware Ver.1.83 and prior, WZR-HP-G301NH firmware Ver.1.83 and prior, WZR-HP-G302H firmware Ver.1.85 and prior, WZR-HP-G450H firmware Ver.1.89 and prior, WZR-300HP firmware Ver.1.99 and prior, WZR-450HP firmware Ver.1.99 and prior, WZR-600DHP firmware Ver.1.99 and prior, WZR-D1100H firmware Ver.1.99 and prior, FS-HP-G300N firmware Ver.3.32 and prior, FS-600DHP firmware Ver.3.38 and prior, FS-R600DHP firmware Ver.3.39 and prior, and FS-G300N firmware Ver.3.13 and prior) allows remote unauthenticated attackers to bypass access restriction and to start telnet service and execute arbitrary OS commands with root privileges via unspecified vectors.

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

It affects 24 products.


Products: Buffalo Bhr-4grv Firmware, Buffalo Dwr-Hp-G300nh Firmware, Buffalo Fs-600dhp Firmware, Buffalo Fs-G300n Firmware, Buffalo Fs-Hp-G300n Firmware, Buffalo Fs-R600dhp Firmware, Buffalo Hw-450hp-Zwe Firmware, Buffalo Whr-300 Firmware, Buffalo Whr-300hp Firmware, Buffalo Whr-G301n Firmware, Buffalo Whr-Hp-G300n Firmware, Buffalo Whr-Hp-Gn Firmware, Buffalo Wpl-05g300 Firmware, Buffalo Wzr-300hp Firmware, Buffalo Wzr-450hp-Cwt Firmware, Buffalo Wzr-450hp-Ub Firmware, Buffalo Wzr-450hp Firmware, Buffalo Wzr-600dhp Firmware, Buffalo Wzr-D1100h Firmware, Buffalo Wzr-Hp-Ag300h Firmware and 4 more.

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

No fix has been published for CVE-2021-3512 yet. Limit exposure of the affected software until one is available.

## Is CVE-2021-3512 being exploited?

There is no known exploitation of CVE-2021-3512 in the wild and no public exploit code.

## Other vulnerabilities in Buffalo broadband routers

- [CVE-2022-40966](https://insights.sbomify.com/CVE-2022-40966/): Auth bypass in Buffalo network devices (high 8.8)
- [CVE-2022-39044](https://insights.sbomify.com/CVE-2022-39044/): Command injection in Buffalo network devices (medium 6.8)
- [CVE-2016-4816](https://insights.sbomify.com/CVE-2016-4816/): Information disclosure in n/a (medium 6.5)
- [CVE-2021-3511](https://insights.sbomify.com/CVE-2021-3511/): Information disclosure in Buffalo broadband routers (medium 4.3)

## Fix prompt for AI coding agents

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

What it is: CVE-2021-3512 is a high-severity authentication bypass vulnerability in Buffalo broadband routers, published on 28 Apr 2021. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2021-3512 in the wild and no public exploit code.

Affected product: Buffalo broadband routers. 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-3512/ (Markdown: https://insights.sbomify.com/CVE-2021-3512/index.md)
```

## Sources

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

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