Miggo Logo

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

5.4

CVSS Score
3.1

Basic Information

EPSS Score
0.61307%
Published
7/14/2022
Updated
1/27/2023
KEV Status
No
Technology
TechnologyJava

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
com.ruoyi:ruoyimaven< 4.7.44.7.4

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from insufficient file type validation in the avatar upload functionality. The updateAvatar controller method directly processes user-supplied files without initially enforcing image extensions. The patch adds MimeTypeUtils.IMAGE_EXTENSION validation to FileUploadUtils.upload calls, indicating the original implementation lacked proper filtering. The POC demonstrates exploiting this by uploading HTML files through the avatar endpoint, which would be handled by these functions. The commit diff confirms these were the exact locations modified to address the vulnerability.

Vulnerable functions

Only Mi**o us*rs **n s** t*is s**tion

WAF Protection Rules

WAF Rule

*n *r*itr*ry *il* uplo** vuln*r**ility in t** ***k*roun* m*n***m*nt mo*ul* o* RuoYi v*.*.* *n* **low *llows *tt**k*rs to *x**ut* *r*itr*ry *o** vi* * *r**t** *TML *il*.

Reasoning

T** vuln*r**ility st*ms *rom insu**i*i*nt *il* typ* v*li**tion in t** *v*t*r uplo** *un*tion*lity. T** up**t**v*t*r *ontroll*r m*t*o* *ir**tly pro**ss*s us*r-suppli** *il*s wit*out initi*lly *n*or*in* im*** *xt*nsions. T** p*t** ***s Mim*Typ*Utils.IM