CVE-2022-0335: Cross Site Request Forgery in Moodle
8.8
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.39231%
CWE
Published
1/28/2022
Updated
9/13/2023
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
moodle/moodle | composer | >= 3.11, < 3.11.5 | 3.11.5 |
moodle/moodle | composer | >= 3.10, < 3.10.8 | 3.10.8 |
moodle/moodle | composer | >= 3.9, < 3.9.11 | 3.9.11 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from missing CSRF protection in the badge alignment deletion endpoint. The patch adds 'require_sesskey()' in alignment_action.php's removal handler and includes sesskey in the delete link generation in renderer.php. The core issue was the absence of a token check in the alignment deletion logic, which is implemented in the main procedural flow of alignment_action.php (not a named function). The high confidence comes from the explicit addition of sesskey checks in the commit diff for these specific code paths.