# CVE-2021-40847: Code injection in n/a

> Remote attackers can achieve root code execution on NETGEAR routers via a Man-in-the-Middle attack exploiting unsigned, cleartext HTTP updates in the Circle daemon.

- **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:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 21 Sep 2021
- **Updated:** 4 Aug 2024
- **Also known as:** GHSA-62q2-fg4c-c2qp

## What is CVE-2021-40847?

CVE-2021-40847 is a high-severity code injection vulnerability in Netgear R6700 Firmware, published on 21 Sep 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

The update process of the Circle Parental Control Service on various NETGEAR routers allows remote attackers to achieve remote code execution as root via a MitM attack. While the parental controls themselves are not enabled by default on the routers, the Circle update daemon, circled, is enabled by default. This daemon connects to Circle and NETGEAR to obtain version information and updates to the circled daemon and its filtering database. However, database updates from NETGEAR are unsigned and downloaded via cleartext HTTP. As such, an attacker with the ability to perform a MitM attack on the device can respond to circled update requests with a crafted, compressed database file, the extraction of which gives the attacker the ability to overwrite executable files with attacker-controlled code. This affects R6400v2 1.0.4.106, R6700 1.0.2.16, R6700v3 1.0.4.106, R6900 1.0.2.16, R6900P 1.3.2.134, R7000 1.0.11.123, R7000P 1.3.2.134, R7850 1.0.5.68, R7900 1.0.4.38, R8000 1.0.4.68, and RS400 1.5.0.68.

Weakness: CWE-319 (Cleartext Transmission of Sensitive Information)

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

It affects 11 products.


Products: Netgear R6400v2 Firmware, Netgear R6700 Firmware, Netgear R6700v3 Firmware, Netgear R6900 Firmware, Netgear R6900p Firmware, Netgear R7000 Firmware, Netgear R7000p Firmware, Netgear R7850 Firmware, Netgear R7900 Firmware, Netgear R8000 Firmware, Netgear Rs400 Firmware.

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

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

## Is CVE-2021-40847 being exploited?

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

## Other vulnerabilities in Netgear R6700 Firmware

- [CVE-2020-35798](https://insights.sbomify.com/CVE-2020-35798/): Command injection in n/a (critical 9.3)
- [CVE-2021-45650](https://insights.sbomify.com/CVE-2021-45650/): Information disclosure in n/a (critical 9.1)
- [CVE-2021-45643](https://insights.sbomify.com/CVE-2021-45643/): Misconfiguration in n/a (high 8.2)
- [CVE-2024-51010](https://insights.sbomify.com/CVE-2024-51010/): Command injection in n/a (high 8.0)
- [CVE-2024-51021](https://insights.sbomify.com/CVE-2024-51021/): Command injection in n/a (high 8.0)

## Fix prompt for AI coding agents

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

What it is: CVE-2021-40847 is a high-severity code injection vulnerability in Netgear R6700 Firmware, published on 21 Sep 2021. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2021-40847 in the wild and no public exploit code.

Affected product: Netgear R6700 Firmware. 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-40847/ (Markdown: https://insights.sbomify.com/CVE-2021-40847/index.md)
```

## Sources

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

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