CVE-2023-30944:
Moodle SQL Injection vulnerability
7.3
CVSS ScoreBasic Information
CVE ID
GHSA ID
EPSS Score
-
CWE
Published
5/2/2023
Updated
4/19/2024
KEV Status
No
Technology
PHP
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:L/A:L
Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
---|---|---|---|
moodle/moodle | composer | < 4.2.0-rc2 | 4.2.0-rc2 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
The vulnerability stems from the pre-patch code in get_subwiki_pages() where user-supplied 'sortby' and 'sortdirection' parameters were concatenated into an SQL ORDER BY clause without proper whitelist validation. The patch introduced get_safe_orderby() to validate these parameters against a predefined list of allowed columns, confirming the original implementation lacked proper input sanitization for SQL query construction.