CVE-2021-36393: SQL injection in Moodle recent courses library
- Vendor
- Moodle
CVE-2021-36393 is an SQL injection vulnerability in Moodle. According to the provided content, the flaw exists in the library responsible for fetching a user's recent courses. Insufficient neutralization of attacker-controlled input in SQL query construction could allow crafted input to alter backend database queries executed by the application.
Impact, mitigation & remediation
What it means and what to do now: patch path, interim mitigations, and the assume-compromise checklist.
Impact
What an attacker gets, and what they’ve been doing with it.
Successful exploitation could permit unauthorized SQL query manipulation against the Moodle backend database. Depending on the application's database permissions and deployment context, this may enable disclosure of sensitive information, modification of stored data, and potentially other database-level impacts.
Mitigation
If you can’t patch tonight, do this now.
If immediate patching is not possible, reduce exposure by restricting access to Moodle to trusted users and networks where feasible, monitoring for anomalous database and application activity, and applying compensating controls such as WAF rules for SQL injection patterns. Specific vendor-provided mitigations were not included in the provided content.
Remediation
Patch, then assume compromise.
Upgrade Moodle to a fixed release. The provided advisory states that the issue is fixed in Moodle 3.9.8 or later in the 3.9 branch, 3.10.5 or later in the 3.10 branch, and 3.11.1 or later in the 3.11 branch.
Exploits
1 exploit validated by Mallory's analysis.
Affected products & vendors
Products and vendors Mallory has correlated with this vulnerability. Open in Mallory to drill down to specific CPE configurations and version ranges.
Frequently asked questions
- Is CVE-2021-36393 exploited in the wild?
- As of Oct 16, 2026, Mallory has no reports of CVE-2021-36393 being exploited in the wild. It is not listed in CISA KEV.
- Is there a public exploit for CVE-2021-36393?
- Yes. Mallory tracks 1 public exploit or proof of concept for CVE-2021-36393, the earliest disclosed Oct 27, 2023.
- Is there a patch for CVE-2021-36393?
- Upgrade Moodle to a fixed release. The provided advisory states that the issue is fixed in Moodle 3.9.8 or later in the 3.9 branch, 3.10.5 or later in the 3.10 branch, and 3.11.1 or later in the 3.11 branch.
- What products are affected by CVE-2021-36393?
- Moodle.
- How severe is CVE-2021-36393?
- CVE-2021-36393 has a CVSS v3.1 score of 9.8 (Critical) and an EPSS score of 52.3% (99th percentile) as of Oct 16, 2026.
Recent activity
No public activity tracked yet. Mallory keeps watching.
No public activity observed for this vulnerability.