CVE-2012-1156:
Moodle backs up private files
7.5
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.7825%
CWE
Published
4/23/2022
Updated
8/29/2023
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
moodle/moodle | composer | >= 2.2, <= 2.2.1 | 2.2.2 |
moodle/moodle | composer | >= 2.1, <= 2.1.4 | 2.1.5 |
moodle/moodle | composer | >= 2.0, <= 2.0.7 | 2.0.8 |
Vulnerability Intelligence
Miggo AI
Root 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:
- backup_stepslib.php code adding 'private' to fileareas when 'user_files' was enabled.
- restore_dbops::create_included_users handling the 'user_files' parameter to restore private files.
- The backup_user_files_setting class managing the vulnerable setting.
- Admin configuration in courses.php enabling the setting by default. These components directly contributed to the insecure inclusion of private files in backups.