# CVE-2022-32065: RuoYi 4.7.3 vulnerable to arbitrary file upload in background management module

> Attackers can execute arbitrary code by uploading a crafted HTML file to the RuoYi background management module.

- **Severity:** Medium 5.4 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 13 Jul 2022
- **Updated:** 3 Aug 2024
- **Also known as:** GHSA-6w2f-6wq3-rjvf

## What is CVE-2022-32065?

CVE-2022-32065 is a medium-severity vulnerability in Ruoyi Ruoyi, published on 13 Jul 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.

### Official description

An arbitrary file upload vulnerability in the background management module of RuoYi v4.7.3 and below allows attackers to execute arbitrary code via a crafted HTML file.

Weakness: CWE-79 (Improper Neutralization of Input During Web Page Generation)

## Which versions are affected by CVE-2022-32065?

2 open source packages ship an affected version, including com.ruoyi:ruoyi. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `com.ruoyi:ruoyi` | Maven | All versions | 4.7.4 |
| `com.ruoyi:ruoyi` | Maven | All versions | 4.7.4 |

Products: Ruoyi Ruoyi.

## How do I fix CVE-2022-32065?

Upgrade com.ruoyi:ruoyi to 4.7.4 or later.

## Is CVE-2022-32065 being exploited?

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

## Other vulnerabilities in Ruoyi Ruoyi

- [CVE-2024-57521](https://insights.sbomify.com/CVE-2024-57521/): SQL injection in n/a (critical 10.0)
- [CVE-2025-28402](https://insights.sbomify.com/CVE-2025-28402/): Privilege escalation in n/a (critical 9.8)
- [CVE-2025-28405](https://insights.sbomify.com/CVE-2025-28405/): Privilege escalation in n/a (critical 9.8)
- [CVE-2025-28406](https://insights.sbomify.com/CVE-2025-28406/): Privilege escalation in n/a (critical 9.8)
- [CVE-2025-28408](https://insights.sbomify.com/CVE-2025-28408/): Missing authorization in n/a (critical 9.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2022-32065 and fix it if it is affected.

What it is: CVE-2022-32065 is a medium-severity vulnerability in Ruoyi Ruoyi, published on 13 Jul 2022. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2022-32065 in the wild and no public exploit code.

Affected packages and fixed versions:
- com.ruoyi:ruoyi (Maven): affected all versions; fixed in 4.7.4
- com.ruoyi:ruoyi (Maven): affected all versions; fixed in 4.7.4

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-2022-32065/ (Markdown: https://insights.sbomify.com/CVE-2022-32065/index.md)
```

## Sources

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

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