# CVE-2023-38902: Command injection in n/a

> An authorized attacker can execute arbitrary commands on Ruijie routers, switches, and access points via a crafted POST request.

- **Severity:** High 8.8 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`)
- **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:** 17 Aug 2023
- **Updated:** 8 Oct 2024
- **Also known as:** GHSA-qf45-5h68-rp79

## What is CVE-2023-38902?

CVE-2023-38902 is a high-severity command injection vulnerability in n/a, published on 17 Aug 2023. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

A command injection vulnerability in RG-EW series home routers and repeaters v.EW_3.0(1)B11P219, RG-NBS and RG-S1930 series switches v.SWITCH_3.0(1)B11P219, RG-EG series business VPN routers v.EG_3.0(1)B11P219, EAP and RAP series wireless access points v.AP_3.0(1)B11P219, and NBC series wireless controllers v.AC_3.0(1)B11P219 allows an authorized attacker to execute arbitrary commands on remote devices by sending a POST request to /cgi-bin/luci/api/cmd via the remoteIp field.

Weakness: CWE-77 (Improper Neutralization of Special Elements used in a Command)

## Which versions are affected by CVE-2023-38902?

It affects 96 products.


Products: Ruijie Rg-Eap101 Firmware, Ruijie Rg-Eap101 V2 Firmware, Ruijie Rg-Eap102\(f\) Firmware, Ruijie Rg-Eap102 Firmware, Ruijie Rg-Eap102 V2 Firmware, Ruijie Rg-Eap162\(g\) Firmware, Ruijie Rg-Eap201 Firmware, Ruijie Rg-Eap202 Firmware, Ruijie Rg-Eap212\(f\) Firmware, Ruijie Rg-Eap212\(g\) Firmware, Ruijie Rg-Eap262\(g\) Firmware, Ruijie Rg-Eap602 Firmware, Ruijie Rg-Eap662\(g\) Firmware, Ruijie Rg-Eg105g-E Firmware, Ruijie Rg-Eg105g-Pe Firmware, Ruijie Rg-Eg105g V2 Firmware, Ruijie Rg-Eg210g-E Firmware, Ruijie Rg-Eg210g-P Firmware, Ruijie Rg-Eg210g-Pe Firmware, Ruijie Rg-Ew1200 Firmware and 76 more.

## How do I fix CVE-2023-38902?

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

## Is CVE-2023-38902 being exploited?

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

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-38902 and fix it if it is affected.

What it is: CVE-2023-38902 is a high-severity command injection vulnerability in n/a, published on 17 Aug 2023. 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-2023-38902 exists.

Affected product: n/a. 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-2023-38902/ (Markdown: https://insights.sbomify.com/CVE-2023-38902/index.md)
```

## Sources

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

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