CVE-2016-2152: Moodle XSS from profile fields from external db
6.1
CVSS Score
3.0
Basic Information
CVE ID
GHSA ID
EPSS Score
0.57388%
CWE
Published
5/13/2022
Updated
1/26/2024
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
moodle/moodle | composer | >= 2.7, < 2.7.13 | 2.7.13 |
moodle/moodle | composer | >= 2.8, < 2.8.11 | 2.8.11 |
moodle/moodle | composer | >= 2.9, < 2.9.5 | 2.9.5 |
moodle/moodle | composer | >= 3.0, < 3.0.3 | 3.0.3 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stemmed from missing input sanitization when handling external database profile fields. The patches (e.g., 3b214760) introduced core_user::get_property_definition() and clean_data() to apply PARAM_* validation. Vulnerable versions lacked these sanitization steps in auth/db/auth.php's user synchronization/update logic, making sync_users and update_user_record the entry points for untrusted data. The commit diffs show added clean_data() calls in these flows, confirming the prior absence of validation.