Moodle 5.3.0, 5.2.0 through 5.2.4, 5.1.0 through 5.1.8, 5.0.0 through 5.0.11, and through 4.5.15 contain an sql injection vulnerability in the External database enrolment plugin via course idnumber. Editing teachers can store a backslash-quote payload in idnumber that executes during scheduled sync on MySQL/MariaDB external databases, reading data and manipulating enrolment results.
https://github.com/moodle/moodle/blob/v5.3.0/public/enrol/database/lib.php#L971-L979
https://github.com/moodle/moodle/blob/v5.3.0/public/enrol/database/lib.php#L918-L926
https://github.com/moodle/moodle/blob/v5.3.0/public/enrol/database/lib.php#L527-L528
https://github.com/moodle/moodle
https://euvd.enisa.europa.eu/vulnerability/EUVD-2026-113819
https://abraxaslabs.tech/research/moodle-enrol-database-sqli
Published: 2026-10-30
Updated: 2026-10-30
Base Score: 5.6
Vector: CVSS2#AV:N/AC:H/Au:S/C:C/I:P/A:N
Severity: Medium
Base Score: 5.9
Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:N
Severity: Medium
Base Score: 6
Vector: CVSS:4.0/AV:N/AC:H/AT:P/PR:L/UI:N/VC:H/VI:L/VA:N/SC:N/SI:N/SA:N
Severity: Medium
EPSS: 0.00215