Miggo Logo

CVE-2023-28330: Moodle arbitrary file read vulnerability

6.5

CVSS Score
3.1

Basic Information

EPSS Score
0.59984%
Published
3/23/2023
Updated
4/19/2024
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
moodle/moodlecomposer>= 4.1.0, < 4.1.24.1.2
moodle/moodlecomposer>= 4.0.0, < 4.0.74.0.7
moodle/moodlecomposer>= 3.11.0, < 3.11.133.11.13
moodle/moodlecomposer< 3.9.203.9.20

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stems from the unvalidated use of $data['initialcontent'] in file_get_contents. The patch adds clean_param() with PARAM_FILE filter to sanitize the filename input. The affected function is clearly identified in the commit diff modifying mod/wiki/backup/moodle1/lib.php, and the CWE-20 classification matches the missing input validation pattern. The function's role in backup processing aligns with the vulnerability's context of malicious backup file exploitation.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

Insu**i*i*nt s*nitizin* in ***kup r*sult** in *n *r*itr*ry *il* r*** risk. T** **p**ility to ****ss t*is ***tur* is only *v*il**l* to t*****rs, m*n***rs *n* **mins *y ****ult.

Reasoning

T** vuln*r**ility st*ms *rom t** unv*li**t** us* o* $**t*['initi*l*ont*nt'] in *il*_**t_*ont*nts. T** p*t** ***s *l**n_p*r*m() wit* P*R*M_*IL* *ilt*r to s*nitiz* t** *il*n*m* input. T** *****t** *un*tion is *l**rly i**nti*i** in t** *ommit *i** mo*i*