Miggo Logo

CVE-2012-1156:
Moodle backs up private files

7.5

CVSS Score
3.1

Basic Information

EPSS Score
0.7825%
Published
4/23/2022
Updated
8/29/2023
KEV Status
No
Technology
TechnologyPHP

Technical Details

CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Package NameEcosystemVulnerable VersionsFirst Patched Version
moodle/moodlecomposer>= 2.2, <= 2.2.12.2.2
moodle/moodlecomposer>= 2.1, <= 2.1.42.1.5
moodle/moodlecomposer>= 2.0, <= 2.0.72.0.8

Vulnerability Intelligence
Miggo AIMiggo AI

Miggo AIRoot Cause Analysis

The vulnerability stemmed from Moodle's backup system including user private files when the 'user_files' setting was enabled. The patch (CVE-2012-1156) removed this setting and all code dependent on it. Key functions identified include:

  1. backup_stepslib.php code adding 'private' to fileareas when 'user_files' was enabled.
  2. restore_dbops::create_included_users handling the 'user_files' parameter to restore private files.
  3. The backup_user_files_setting class managing the vulnerable setting.
  4. Admin configuration in courses.php enabling the setting by default. These components directly contributed to the insecure inclusion of private files in backups.

Vulnerable functions

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

WAF Protection Rules

WAF Rule

Moo*l* ***or* *.*.*, *.*.*, *n* *.*.* *** us*rs' priv*t* *il*s in*lu*** in *ours* ***kups unn***ss*rily.

Reasoning

T** vuln*r**ility st*mm** *rom Moo*l*'s ***kup syst*m in*lu*in* us*r priv*t* *il*s w**n t** 'us*r_*il*s' s*ttin* w*s *n**l**. T** p*t** (*V*-****-****) r*mov** t*is s*ttin* *n* *ll *o** **p*n**nt on it. K*y *un*tions i**nti*i** in*lu**: *. ***kup_st*