CVE-2024-43436
High · 7.2Moodle vulnerable to site administration SQL injection via XMLDB editor
CVSS
7.2
EPSS
0.8%
Published
Nov 7, 2024
CISA due date
—
Cloudanix analysis
A flaw in an administrative database tool lets site managers run unauthorized database commands that could expose or change student and course information.
- Exploitation
- Remote Authenticated
- Attacker needs
- High Privilege
- Complexity
- Moderate
- Impact
- Full Compromise
- Component
- Application
- Class
- SQL Injection
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
Unsanitized user input in the XMLDB editor is concatenated directly into SQL queries, allowing an authenticated site administrator to execute arbitrary SQL statements against the database.
Why it matters to the business
An administrator could read, modify, or delete sensitive data stored in the Moodle database, potentially leading to data exposure or integrity loss for the entire learning platform.
How an attack unfolds
An attacker logs in with site administrator privileges, opens the XMLDB editor, and supplies a crafted payload that alters the generated SQL statement to perform unauthorized operations such as data exfiltration or privilege changes.
How to fix it
Upgrade Moodle to the commit aea9770cfc7d003a737f4899489d1e3982efe9ac or later; restrict XMLDB editor access to trusted administrators until the patch is applied.
How to confirm the fix worked
Confirm the installed codebase contains commit aea9770cfc7d003a737f4899489d1e3982efe9ac and test that previously exploitable inputs no longer alter query behavior.
Typical attack path
- Obtain site administrator credentials
- Navigate to the XMLDB editor interface
- Submit malicious input containing SQL syntax
- Trigger the vulnerable code path that builds and executes the query
- Observe or extract results from the database response
How to detect it
Review web server and application logs for XMLDB editor requests containing SQL metacharacters, unusual query patterns, or sudden large data exports initiated by administrator accounts.
What your security team should do
- Apply the fixed commit immediately given administrator-level access to the editor
- Audit administrator accounts and reduce the number of users with XMLDB editor rights
- Enable database query logging for the XMLDB editor module to monitor for anomalous statements
The record
A SQL injection risk flaw was found in the XMLDB editor tool available to site administrators.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|---|---|---|
| Packagist | moodle/moodle | 0 | 4.1.12 |
| Packagist | moodle/moodle | 4.2.0-beta | 4.2.9 |
| Packagist | moodle/moodle | 4.3.0-beta | 4.3.6 |
| Packagist | moodle/moodle | 4.4.0-beta | 4.4.2 |
| Bitnami | moodle | 4.1.0 | 4.1.12 |
| Ubuntu:16.04:LTS | moodle | 0 | No fix |
| Ubuntu:18.04:LTS | moodle | 0 | No fix |
| Ubuntu:Pro:16.04:LTS | moodle | 0 | No fix |
| Ubuntu:Pro:18.04:LTS | moodle | 0 | No fix |
| packagist | moodle/moodle | 4.2.0-beta | 4.2.9 |
| packagist | moodle/moodle | 4.3.0-beta | 4.3.6 |
| packagist | moodle/moodle | 4.4.0-beta | 4.4.2 |
Related vulnerabilities
- GHSA-ggxq-2mg9-8966 Moodle has a Remote Code Execution risk via file restore Also affects moodle/moodle
- GHSA-cg8j-5cr2-568q Moodle TeX formula editor is vulnerable to DoS through lack of execution time limits Also affects moodle/moodle
- CVE-2026-26047 A denial-of-service vulnerability was identified in Moodle’s TeX formula editor. Also affects moodle/moodle
- CVE-2026-26045 A flaw was identified in Moodle’s backup restore functionality where specially crafted… Also affects moodle/moodle
- GHSA-5cx4-w4fh-fr57 Moodle Affected by Improper Restriction of Excessive Authentication Attempts Also affects moodle/moodle
- GHSA-8jrv-wx83-w3xj Moodle Inserts Sensitive Information Into Sent Data Also affects moodle/moodle
- GHSA-hcm6-q6pc-xfhm Moodle has an authorization logic flaw Also affects moodle/moodle
- GHSA-qv78-6gpp-hm68 Moodle Open Redirect vulnerability Also affects moodle/moodle