# CVE-2021-4242: Sapido BR270n/BRC76n/GR297/RB1732 syscmd.htm os command injection

> Remote attackers can execute arbitrary OS commands on Sapido routers via the syscmd.htm interface, potentially compromising the device.

- **Severity:** Medium 6.3 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** No
- **Published:** 30 Nov 2022
- **Updated:** 15 Apr 2025
- **Also known as:** GHSA-2gp5-q39j-fmr2

## What is CVE-2021-4242?

CVE-2021-4242 is a medium-severity command injection vulnerability in Sapido BR270n, published on 30 Nov 2022. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

A vulnerability was found in Sapido BR270n, BRC76n, GR297 and RB1732 and classified as critical. Affected by this issue is some unknown functionality of the file ip/syscmd.htm. The manipulation leads to os command injection. The attack may be launched remotely. The exploit has been disclosed to the public and may be used. The identifier of this vulnerability is VDB-214592.

Weakness: CWE-78 (Improper Neutralization of Special Elements used in an OS Command), CWE-707 (Improper Neutralization)

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

It affects 4 products.


Products: Sapido Br270n Firmware, Sapido Brc76n Firmware, Sapido Gr297n Firmware, Sapido Rb-1732 Firmware.

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

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

## Is CVE-2021-4242 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-4242 exists.

## Fix prompt for AI coding agents

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

What it is: CVE-2021-4242 is a medium-severity command injection vulnerability in Sapido BR270n, published on 30 Nov 2022. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2021-4242 exists.

Affected product: Sapido BR270n. 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-4242/ (Markdown: https://insights.sbomify.com/CVE-2021-4242/index.md)
```

## Sources

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

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