CVE-2011-4301:
Moodle Allows Modification of Constants
5
CVSS Score
Basic Information
CVE ID
GHSA ID
EPSS Score
0.5058%
CWE
Published
5/13/2022
Updated
1/17/2024
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
AV:N/AC:L/Au:N/C:N/I:P/A:N
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
moodle/moodle | composer | < 1.9.14 | 1.9.14 |
moodle/moodle | composer | >= 2.0, < 2.0.5 | 2.0.5 |
moodle/moodle | composer | >= 2.1, < 2.1.2 | 2.1.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the MoodleQuickForm
class not properly handling 'setConstant' operations. The patch adds a critical check for _constantValues
in exportValues()
and merges them into the form data. This indicates the original implementation lacked this merge step, allowing constant fields to be modified by clients. The function exportValues()
is directly modified in the fix, confirming its role in the vulnerability. The CWE-471
(MAID) classification further supports this, as the flaw involved modifying assumed-immutable data via missing constant enforcement.