Moodle, Unauthenticated REST API User Data Exposure, CVE-2025-XXXX (High)

Listen to this Post

How the CVE Works

The vulnerability (CVE-2025-XXXX) in Moodle allows unauthenticated attackers to extract sensitive user data via improperly handled REST API stack traces. When certain API endpoints encounter errors, they may return debug information, including user details like names, emails, and hashed passwords. This occurs when PHP’s `zend.exception_ignore_args` setting is disabled (Off or 0), exposing arguments passed to functions in error logs. Attackers exploit malformed API requests to trigger these errors, leaking confidential data without authentication. Moodle instances using internal authentication (non-LDAP/OAuth) are at risk unless explicitly configured to suppress argument logging.

DailyCVE Form

Platform: Moodle LMS
Version: <4.3.0
Vulnerability: Unauthenticated data exposure
Severity: High
Date: 2025-04-25

What Undercode Say:

Exploitation:

1. Craft Malformed API Request:

curl -X POST "https://<target>/webservice/rest/server.php" -d "invalid=payload"

2. Extract Stack Traces:

grep "password" error_log.txt

3. Automate with Script:

import requests
response = requests.post("https://<target>/api", data={"malformed": True})
print(response.text) Check for exposed data

Mitigation:

1. Disable Debug Mode:

Edit `php.ini`:

zend.exception_ignore_args = On
display_errors = Off

2. Update Moodle:

sudo apt upgrade moodle

3. Restrict API Access:

In Moodle config (`config.php`):

$CFG->debug = 0;
$CFG->debugdisplay = 0;

4. Monitor Logs:

tail -f /var/log/apache2/error.log | grep "exception"

Detection:

  • Check PHP Settings:
    php -i | grep "exception_ignore_args"
    
  • Audit API Endpoints:
    nmap -p 443 --script http-vuln-cve2025xxxx <target>
    

References:

Sources:

Reported By: github.com
Extra Source Hub:
Undercode

Join Our Cyber World:

💬 Whatsapp | 💬 TelegramFeatured Image

Scroll to Top