CVE-2023-35133

7.5 HIGH

📋 TL;DR

This CVE describes a Server-Side Request Forgery (SSRF) vulnerability in Moodle's cURL blocked hosts list logic. The flaw allows attackers to bypass IP address restrictions by using 0.0.0.0, potentially accessing internal network resources. It affects multiple Moodle versions including 4.2, 4.1-4.1.3, 4.0-4.0.8, 3.11-3.11.14, and 3.9-3.9.21.

💻 Affected Systems

Products:
  • Moodle
Versions: 4.2, 4.1 to 4.1.3, 4.0 to 4.0.8, 3.11 to 3.11.14, 3.9 to 3.9.21 and earlier unsupported versions
Operating Systems: All platforms running affected Moodle versions
Default Config Vulnerable: ⚠️ Yes
Notes: Affects Moodle installations using cURL with blocked hosts configuration

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers could access internal services, sensitive data, or perform internal network reconnaissance by bypassing IP restrictions.

🟠

Likely Case

Unauthorized access to internal web services or APIs that should be blocked by Moodle's security controls.

🟢

If Mitigated

Limited impact if network segmentation and proper access controls are already in place for internal services.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Exploitation requires ability to trigger Moodle's cURL functionality with controlled parameters

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Moodle 4.2.1, 4.1.4, 4.0.9, 3.11.15, 3.9.22

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

Restart Required: No

Instructions:

1. Backup your Moodle installation and database. 2. Download the patched version from moodle.org. 3. Replace affected files with patched versions. 4. Clear Moodle caches. 5. Verify functionality.

🔧 Temporary Workarounds

Block 0.0.0.0 at network level

all

Configure network firewalls to block outbound connections to 0.0.0.0 from Moodle servers

Restrict Moodle server network access

all

Implement strict outbound firewall rules limiting Moodle server connections to only necessary external services

🧯 If You Can't Patch

  • Implement network segmentation to isolate Moodle servers from sensitive internal resources
  • Deploy web application firewall (WAF) rules to detect and block SSRF attempts

🔍 How to Verify

Check if Vulnerable:

Check Moodle version via Administration > Site administration > Notifications page or by examining version.php file

Check Version:

grep "\$release" /path/to/moodle/version.php

Verify Fix Applied:

Verify Moodle version is updated to patched versions: 4.2.1, 4.1.4, 4.0.9, 3.11.15, or 3.9.22

📡 Detection & Monitoring

Log Indicators:

  • Unusual outbound connections from Moodle server to internal IP ranges
  • HTTP requests with 0.0.0.0 in URLs

Network Indicators:

  • Outbound connections from Moodle server to unexpected internal services
  • Traffic patterns suggesting SSRF attempts

SIEM Query:

source="moodle-logs" AND (url="*0.0.0.0*" OR dest_ip IN (private_ip_ranges))

🔗 References

📤 Share & Export