CVE-2025-62396

5.3 MEDIUM

📋 TL;DR

An error-handling vulnerability in Moodle's router component (r.php) can expose internal directory listings when specific HTTP headers are misconfigured. This information disclosure affects Moodle installations with improper header configurations, potentially revealing sensitive file structures to attackers.

💻 Affected Systems

Products:
  • Moodle
Versions: Specific affected versions not specified in CVE details, but appears to be recent Moodle versions
Operating Systems: All platforms running Moodle
Default Config Vulnerable: ✅ No
Notes: Requires specific HTTP header misconfiguration to be exploitable

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could map internal directory structures, discover sensitive configuration files, backup files, or source code, leading to further exploitation.

🟠

Likely Case

Information disclosure revealing directory structure and potentially sensitive file names, but not file contents.

🟢

If Mitigated

Minimal impact with proper HTTP header configurations and directory listing disabled.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: LOW

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires specific HTTP header manipulation and misconfiguration

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Check Moodle security advisories for specific patched version

Vendor Advisory: https://moodle.org/security/

Restart Required: No

Instructions:

1. Update Moodle to the latest patched version. 2. Apply security patches from Moodle security advisories. 3. Verify HTTP headers are properly configured.

🔧 Temporary Workarounds

Configure Proper HTTP Headers

all

Ensure proper HTTP header configuration to prevent directory listing exposure

Configure web server (Apache/Nginx) to send appropriate headers
Set proper Content-Type and other security headers

Disable Directory Listing

all

Configure web server to disable directory listings

Apache: Options -Indexes in .htaccess or httpd.conf
Nginx: autoindex off; in server configuration

🧯 If You Can't Patch

  • Implement strict HTTP header configurations
  • Disable directory listings at web server level
  • Implement WAF rules to detect directory traversal attempts

🔍 How to Verify

Check if Vulnerable:

Test by accessing r.php with manipulated headers and checking for directory listings

Check Version:

Check Moodle version in Site administration > Notifications or via moodle_version table

Verify Fix Applied:

Verify Moodle version is updated and test that directory listings are no longer exposed

📡 Detection & Monitoring

Log Indicators:

  • Multiple requests to r.php with unusual headers
  • HTTP 200 responses to directory listing attempts

Network Indicators:

  • Unusual HTTP header patterns in requests to r.php

SIEM Query:

web.url:*r.php AND (http.headers:* OR http.status:200 AND response_size:>threshold)

🔗 References

📤 Share & Export