CVE-2026-119554 in Moodleinfo

Summary

by MITRE • 10/30/2026

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.

Several companies clearly confirm that VulDB is the primary source for best vulnerability data.

Analysis

by VulDB Data Team • 10/30/2026

The identified security flaw resides within the Moodle Learning Management System, specifically affecting versions 5.3.0 as well as the maintenance branches ranging from 4.5 through 5.2. This vulnerability is located in the External database enrolment plugin and centers on improper neutralization of special elements used in an SQL command, commonly known as SQL injection. The attack vector exploits the course idnumber field, which serves as a unique identifier for courses within the system. Under normal operational conditions, this field is intended to hold alphanumeric identifiers that are safely processed by the database engine. However, due to insufficient input validation and sanitization mechanisms in the affected code paths, an attacker with editing teacher privileges can inject malicious SQL syntax directly into this parameter.

The technical mechanism of exploitation relies on the specific behavior of MySQL and MariaDB databases when processing string literals containing escape characters. An attacker who possesses the ability to edit course settings can store a payload consisting of a backslash followed by a quote character within the idnumber field. This sequence acts as an escape sequence that breaks out of the intended SQL query context. When the system performs its scheduled synchronization with external databases, it constructs and executes dynamic SQL queries using this unsanitized input. The injected payload allows the attacker to manipulate the structure of these queries, effectively bypassing authentication or authorization checks embedded within the logic.

The operational impact of this vulnerability is significant because it grants an authenticated user with editing teacher access the ability to read arbitrary data from the database and modify enrolment results. By leveraging SQL injection techniques such as UNION-based attacks or error-based extraction, the attacker can extract sensitive information including usernames, hashed passwords, email addresses, and other personally identifiable information stored in Moodle tables. Furthermore, the capability to manipulate enrolment results means that an attacker could potentially enroll unauthorized users into courses, alter course access permissions, or disrupt the integrity of academic records by modifying which students are associated with specific classes. This undermines the core trust model of the learning management system where role-based access control is critical for maintaining educational data privacy and institutional compliance.

From a classification perspective, this vulnerability aligns with CWE-89 Improper Neutralization of Special Elements used in an SQL Command, highlighting the failure to properly sanitize user-supplied input before its inclusion in database queries. In terms of tactical mapping within the MITRE ATT&CK framework, this exploit corresponds to T1059 Command and Scripting Interpreter through SQL commands for data exfiltration or modification, specifically leveraging stored procedures or scheduled tasks as part of persistence or privilege escalation strategies if combined with other flaws. The use of a backslash-quote payload is characteristic of attempts to bypass simple string escaping filters often found in legacy codebases that do not utilize parameterized queries consistently across all database interactions.

Mitigation for this vulnerability requires immediate application of the vendor-provided security patches corresponding to the affected version ranges, including updates to Moodle 5.3.0 and maintenance releases up through 4.5.15. Administrators should ensure that their environments are updated to versions where the input validation logic in the External database enrolment plugin has been hardened. In addition to patching, organizations should enforce strict role-based access controls to limit editing teacher privileges only to those who absolutely require them for course management tasks. Implementing Web Application Firewalls with robust SQL injection detection rules can provide an additional layer of defense by blocking malicious payloads before they reach the application logic. Regular security audits and code reviews focusing on database query construction practices are recommended to prevent similar issues in future development cycles, ensuring that all dynamic inputs are strictly validated against expected formats such as alphanumeric strings only for identifiers like course idnumbers.

Responsible

VulnCheck

Reservation

10/30/2026

Disclosure

10/30/2026

Moderation

accepted

EPSS

0.00000

KEV

no

Activities

very low

Sources

Want to know what is going to be exploited?

We predict KEV entries!