CVE-2026-119554

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

Published Oct 30, 2026 CVSS 4.0 · 6 Medium EPSS < 1% KEV · Not listed
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.

Analysis

AI-generated

Technical impact

Moodle 5.3.0 and earlier releases contain a SQL injection flaw in the enrol_database plugin that allows a teacher with editing privilege to inject a backslash‑quote payload into the course idnumber field. During scheduled synchronisation with an external MySQL or MariaDB database, the payload is executed, enabling the attacker to read arbitrary data from the external database and manipulate enrolment records. This is a classic injection flaw matching CWE‑89 and can result in data exposure and integrity compromise.

Affected Systems

Customers running Moodle Project Moodle versions 4.5.15, 5.0.0‑5.0.11, 5.1.0‑5.1.8, 5.2.0‑5.2.4, or 5.3.0 are affected. The vulnerability exists in the external database enrolment plugin across all these releases.

Risk and Exploitability

The vulnerability has a CVSS base score of 6, indicating moderate severity. EPSS data is not available, and the issue is not listed in CISA's KEV catalog, suggesting no widespread exploitation yet. The attack requires a teacher to edit a course idnumber and the system must have the external database enrolment plugin configured; thus the attack vector is common web access with teacher credentials. If the conditions are met, an attacker could read data from the external database and alter enrolment, presenting a moderate to high risk for institutions that rely on sensitive user data.

Remediation

No solution or workaround provided in the CVE record.

OpenCVE Recommended Actions

  • Update Moodle to the newest release that includes the fix for the enrol_database plugin.
  • Disable the enrol_database enrolment plugin on courses that do not require external database synchronisation or restrict its use to trusted courses.
  • Sanitize the course idnumber field so it accepts only alphanumeric characters, removing the ability to inject backslash‑quotes or other special characters.
  • Review role assignments so that only authorized administrators, not all teachers, can modify the course idnumber.

Generated by OpenCVE AI on October 30, 2026 at 12:41 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories available
History
Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'none', 'Technical Impact': 'partial'}, 'version': '2.0.3'}

Type Values Removed Values Added
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.
Title 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
First Time appeared Moodle
Moodle moodle
Weaknesses CWE-89
CPEs cpe:2.3:a:moodle:moodle:*:*:*:*:*:*:*:*
cpe:2.3:a:moodle:moodle:5.3.0:*:*:*:*:*:*:*
Vendors & Products Moodle
Moodle moodle
References
Metrics cvssV3_1

{'score': 5.9, 'vector': 'CVSS:3.1/AV:N/AC:H/PR:L/UI:N/S:U/C:H/I:L/A:N'}

cvssV4_0

{'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'}

Weaknesses
  • CWE-89

    Improper Neutralization of Special Elements used in an SQL Command ('SQL Injection')

Sources

Status
PUBLISHED
Assigner
VulnCheck
Published
Updated
Nov 4, 2026, 10:18 PM
Reserved
Oct 30, 2026, 10:53 AM
Status
Awaiting Analysis
Published
Oct 30, 2026, 12:16 PM
Modified
Nov 4, 2026, 11:17 PM