CVE-2006-4936: Moodle does not properly validate module instance id
10
CVSS Score
Basic Information
CVE ID
GHSA ID
EPSS Score
0.58439%
CWE
Published
5/1/2022
Updated
2/12/2024
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
AV:N/AC:L/Au:N/C:C/I:C/A:C
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
moodle/moodle | composer | < 1.6.2 | 1.6.2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from using get_record('course_modules', 'id', $id) without verifying the module context. The patch introduced get_coursemodule_from_id(), which adds module-type validation (via JOIN on modules table). The widespread replacement of get_record with this new function across 30+ module files indicates the original pattern was unsafe. CWE-20 is directly addressed by adding proper input validation through module-type checks.