Description
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.
Severity (CVSS)
| Base score | 6 |
|---|---|
| Severity | Medium |
| Version | CVSS 4.0 |
| 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 |
| Provided by | CNA |
Weaknesses
- CWE-89 — Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Moodle Project | moodle | 5.3.0 [affected]; 5.2.0 to <=5.2.4 [affected]; 5.1.0 to <=5.1.8 [affected]; 5.0.0 to <=5.0.11 [affected]; 0 to <=4.5.15 [affected] |
References
- https://github.com/moodle/moodle/blob/v5.3.0/public/enrol/database/lib.php#L918-L926 (technical-description)
- https://github.com/moodle/moodle/blob/v5.3.0/public/enrol/database/lib.php#L971-L979 (technical-description)
- https://github.com/moodle/moodle/blob/v5.3.0/public/enrol/database/lib.php#L527-L528 (technical-description)
- https://abraxaslabs.tech/research/moodle-enrol-database-sqli (third-party-advisory)
- https://github.com/moodle/moodle (product)
- https://www.vulncheck.com/advisories/moodle-through-5.3.0-5.2.4-5.1.8-5.0.11-and-4.5.15-sql-injection-via-enrol-database-course-idnumber (third-party-advisory)
Assess this vulnerability
Compare your deployed product and version with the source record. Review vendor references for fixes and workarounds. A CVSS score describes technical severity; it does not establish that your systems are affected or that exploitation has occurred.
Browse all CVE security advisories · Symaro cybersecurity services
Generated from the official CVE List on 31 Oct 2026 07:01 UTC.