CVE-2025-26533

8.1 HIGH

📋 TL;DR

This SQL injection vulnerability in Moodle's course search module filter allows attackers to execute arbitrary SQL commands on the database. It affects Moodle installations with the vulnerable module enabled, potentially exposing sensitive user data, course information, and system configuration.

💻 Affected Systems

Products:
  • Moodle
Versions: Specific versions not detailed in references, but appears to affect recent versions prior to the fix commit MDL-84271
Operating Systems: All platforms running Moodle
Default Config Vulnerable: ⚠️ Yes
Notes: Requires the course search module to be enabled and accessible. The vulnerability is in the module list filter functionality.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete database compromise leading to data theft, data manipulation, privilege escalation, and potential remote code execution if database functions allow it.

🟠

Likely Case

Extraction of sensitive user information (passwords, personal data), course content theft, and potential authentication bypass.

🟢

If Mitigated

Limited information disclosure from database tables accessible to the application user account.

🌐 Internet-Facing: HIGH - Moodle instances exposed to the internet are directly vulnerable to automated scanning and exploitation.
🏢 Internal Only: MEDIUM - Internal attackers or compromised internal systems could exploit this vulnerability.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires understanding of Moodle's course search functionality and SQL injection techniques. No public exploit code identified in references.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Version containing commit MDL-84271

Vendor Advisory: https://moodle.org/mod/forum/discuss.php?d=466150

Restart Required: No

Instructions:

1. Update Moodle to the latest stable version. 2. Apply the specific patch from commit MDL-84271 if available. 3. Verify the course search module filter functionality has been patched.

🔧 Temporary Workarounds

Disable Course Search Module

all

Temporarily disable the vulnerable course search module to prevent exploitation

Navigate to Site administration > Plugins > Activity modules > Manage activities > Disable 'Course search'

Web Application Firewall Rules

all

Implement WAF rules to block SQL injection patterns in course search requests

Add rules to detect and block SQL keywords in course search parameters

🧯 If You Can't Patch

  • Implement strict input validation on all course search parameters
  • Apply principle of least privilege to database user account

🔍 How to Verify

Check if Vulnerable:

Check if your Moodle version includes the vulnerable code by examining the course search module filter functionality or checking for commit MDL-84271 in your codebase.

Check Version:

Navigate to Site administration > Notifications in Moodle admin panel to check version

Verify Fix Applied:

Verify the patch has been applied by checking that the course search module filter properly sanitizes input parameters and no longer allows SQL injection.

📡 Detection & Monitoring

Log Indicators:

  • Unusual SQL queries in database logs
  • Multiple failed login attempts following course search activity
  • Unexpected database errors in application logs

Network Indicators:

  • Unusual patterns in course search API requests
  • Requests containing SQL keywords in parameters

SIEM Query:

source="moodle_logs" AND ("SQL syntax" OR "database error" OR "course search" AND (SELECT OR UNION OR INSERT))

🔗 References

📤 Share & Export