Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessAuthenticate as editing teacher
-
ExploitStore backslash-quote payload in course idnumber
-
ExecutionScheduled sync executes injected SQL on external MySQL/MariaDB
-
ImpactRead data and manipulate enrolment results
Vulnerability Assessment
| Weakness |
CWE
OWASP Top 10:2025
A05:2025 - Injection
ASVS 5.0
V1 - Encoding and Sanitization Parameterized queries, prepared statements
MITRE ATT&CK
2 techniques across 2 tactics: Initial Access, Persistence The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Exploitation requires the External database enrolment plugin (enrol_database) to be enabled and configured against a MySQL or MariaDB external database - a non-default deployment mode. The attacker must hold an editing-teacher role (PR:L) sufficient to set a course's idnumber field, and the malicious backslash-quote payload only executes when the scheduled enrolment sync task runs, so the attacker does not control trigger timing (reflected in AT:P/AC:H). Exploitation is limited to installations using this specific plugin with a MySQL/MariaDB backend; sites not using external-database enrolment, or using a different external DB engine, are not affected by this vector. No end-user interaction is required (UI:N). |
| Impact | The signals converge on a genuine but non-urgent, bounded risk rather than a drop-everything emergency. The CVSS 4.0 base score is 6.0 (medium), and the vector itself tempers the AV:N network reach: AC:H and AT:P mean exploitation is conditional and timing-dependent (the payload only fires when the scheduled enrolment sync runs), and PR:L means the attacker must already hold an editing-teacher role. vuln.today assigns the 'this_month' decision label, consistent with a medium-priority, patch-in-normal-cycle item. There is no CISA KEV listing and no EPSS score in the provided data, so there is no evidence of widespread or active exploitation; the only exploitation signal is a VulnCheck advisory and an abraxaslabs research write-up (a public PoC reference that is not verified as working exploit code). The impact is skewed toward confidentiality (VC:H - reading data from the external MySQL/MariaDB database) with only limited integrity to enrolment results (VI:L) and no availability impact. Net: this is a real priority to schedule for patching, not a high-CVSS-but-illusory issue, but the authenticated-insider prerequisite (editing teacher) plus the non-default external-database enrolment configuration and the scheduled-sync trigger substantially narrow realistic exploitation to environments running that specific plugin against MySQL/MariaDB. EPSS and KEV data are absent - confirm with current feeds before final prioritization. |
| Exploit ScenarioDerived | An attacker holding an editing-teacher role on a Moodle site stores a crafted backslash-quote SQL injection payload in a course's idnumber field. When the External database enrolment plugin's scheduled sync task next runs against a MySQL/MariaDB external database, the injected SQL executes, allowing the attacker to read data and manipulate enrolment results. A public research write-up (abraxaslabs) and VulnCheck advisory exist, but the input does not confirm working, weaponized exploit code. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv1 – Oct 30, 2026
SQL injection in Moodle's External database enrolment plugin (enrol_database) lets a user with an editing-teacher role store a backslash-quote payload in a course's idnumber field that is later executed by the scheduled enrolment sync task, allowing them to read data from and manipulate enrolment results in the linked MySQL/MariaDB external database. Only sites that have enabled and configured this non-default enrolment plugin against a MySQL or MariaDB backend are exposed; the payload fires only when the scheduled sync runs, so the attacker does not control trigger timing. No KEV listing is present and no verified working exploit code was identified at time of analysis, though a third-party research writeup is referenced; the source-level links in the advisory point to the affected code in v5.3.0 rather than to a confirmed fix.
RemediationAI
The available data does not list a vendor-released fixed version, so treat upgrade guidance as pending and watch the Moodle security advisories, the VulnCheck advisory and the moodle/moodle repository for the release that addresses the enrol_database quoting issue. In the meantime, the most direct control is to disable the External database enrolment plugin if it is not actively required (Site administration > Plugins > Enrolments > Manage enrol plugins), at the cost of losing external-database enrolment sync entirely; sites that need it can instead repoint the plugin at a non-MySQL/MariaDB external database engine, accepting migration effort and the risk of behaviour differences in the sync, since the injected syntax is tied to MySQL/MariaDB. Reduce the attack surface further by restricting which roles hold course-settings editing rights (the editing-teacher role and the capability that permits changing a course idnumber) so that only trusted staff can set that field, acknowledging this narrows legitimate course-management workflows. Because malicious content lands in the idnumber field before execution, audit course idnumber values for backslash or quote sequences and review scheduled enrolment sync logs and the external account's query activity for anomalous reads or enrolment changes; these are detection measures, not a substitute for the eventual vendor update.
Affected VersionsENISA
Affected Packages
Source: OSV (Open Source Vulnerabilities)
Affects your stack
Affects 1 package in euvd
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
CWE-89 (SQL injection) affecting the External database enrolment plugin, which synchronises course enrolments from tables in a separate database instead of Moodle's own. The plugin builds SQL around course idnumber values (referenced code at public/enrol/database/lib.php lines 918-926, 971-979 and 527-528 in the v5.3.0 tree), and the flaw is a quoting/escaping weakness in which a backslash-quote sequence written into a course idnumber is not neutralised before being concatenated into the query run by the scheduled sync task. Because the injection is stored and executes on the sync schedule rather than on the attacker's request, exploitation requires patience and the assessed vector reflects that with AC:H and AT:P; the attacker must already hold an editing-teacher role (PR:L) able to set the course idnumber, and no end-user interaction is needed (UI:N). Impact per the independent assessment is high confidentiality and low integrity on the Moodle host's linked database (C:H/I:L/A:N), i.e. bulk read of data reachable by the external-database account plus tampering with enrolment outcomes, not code execution or availability loss. The specific mechanism is confined to MySQL/MariaDB backends: installations using a different external database engine, or not using enrol_database at all, are not affected by this vector.
Know when Moodle gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
Severity by source
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
Requires an authenticated editing teacher (PR:L) and fires only on the scheduled sync against MySQL/MariaDB (AC:H); reads data (C:H) with limited integrity to enrolment results (I:L), no availability impact.
Primary rating from Vendor (VulnCheck).
CVSS VectorVendor: VulnCheck
DescriptionCVE.org
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.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
SQL injection exploits the way applications construct database queries by mixing user input directly into SQL statements.
Moodle through 2.5.2 allows remote authenticated administrators to execute arbitrary programs by configuring the aspell
A command execution vulnerability exists in the default legacy spellchecker plugin in Moodle 3.10. Rated critical severi
A flaw was found in Moodle. Rated high severity (CVSS 8.1), this vulnerability is remotely exploitable, no authenticatio
In Moodle 2.x and 3.x, SQL injection can occur via user preferences. Rated critical severity (CVSS 9.8), this vulnerabil
The Moodle LMS Jmol plugin version 6.1 and earlier contains a path traversal vulnerability in jsmol.php. The query param
Multiple cross-site scripting (XSS) vulnerabilities in Moodle through 2.2.11, 2.3.x before 2.3.9, 2.4.x before 2.4.6, an
Unrestricted file upload vulnerability in the double extension support in the "image" module in Moodle 3.1.2 allows remo
Unrestricted file upload vulnerability in the "legacy course files" and "file manager" modules in Moodle 3.1.2 allows re
moodle before versions 3.5.2, 3.4.5, 3.3.8, 3.1.14 is vulnerable to an XML import of ddwtos could lead to intentional re
An issue was discovered in Moodle 3.x. Rated high severity (CVSS 8.8), this vulnerability is remotely exploitable, low a
Moodle 3.1.2 allows remote attackers to obtain sensitive information via unspecified vectors, related to a "SQL Injectio
Moodle 3.10.3 contains a persistent cross-site scripting vulnerability in the calendar event subtitle field that allows
EUVD-2026-113819
GHSA-53qh-jc6r-4vvr
NVD
CVE.org
EPSS
Exploit-DB