CVE-2021-3943:
Moodle vulnerable to RCE via unsafe deserialization
9.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.77952%
CWE
Published
11/23/2021
Updated
7/11/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:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
moodle/moodle | composer | >= 3.11, <= 3.11.3 | 3.11.4 |
moodle/moodle | composer | >= 3.10, <= 3.10.7 | 3.10.8 |
moodle/moodle | composer | >= 3.9, <= 3.9.10 | 3.9.11 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from unsafe use of PHP's native unserialize() on user-controlled backup data (configdata). The commit diff shows multiple instances where unserialize(base64_decode(...)) was replaced with a safer unserialize_object() wrapper. The affected functions directly deserialize backup content without proper validation, enabling malicious object injection. Key files showing this pattern include restore_stepslib.php (core backup handling) and several block implementations (HTML, RSS client) that process serialized configdata.