MoodleCMS

CVE-2025-62396

MEDIUM · 5.3 CVSS v3.1 Published 2025-10-23
Fix available
A fix is available. Upgrade to 4.5.7 / 5.0.3 or later.
See remediation →
62/100
Remediation priority · Elevated
Remotely reachable No privileges Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
An error-handling issue in the Moodle router (r.php) could cause the application to display internal directory listings when specific HTTP headers were not properly configured.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · moderate confidence

Moodle's router (r.php) has an error-handling flaw where missing or misconfigured HTTP headers can trigger the web server to display internal directory listings instead of proper error pages, exposing file paths and directory structure to users.

MitigationConfigure web server (Apache/Nginx) to suppress directory listings and ensure proper HTTP security headers are set to prevent information disclosure during error conditions.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
MoodleCMS
Affected:>= 4.5.0, < 4.5.7>= 5.0.0, < 5.0.3

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
None
User interaction
None
Scope
Unchanged
Confidentiality
Low
Integrity
None
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:N

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Identify installed Moodle version
    Locate the version.php file in your Moodle installation directory (usually /lib/version.php or check the Moodle administration dashboard under Site Administration > Server > Environment). Look for the $version variable to determine the exact version installed.
    Affected if The installed version is >= 4.5.0 and < 4.5.7, OR >= 5.0.0 and < 5.0.3
  2. Verify r.php router file is present
    Check if the file r.php exists in the Moodle root web directory. This is the router script referenced in the CVE. Common path: /r.php or /your-moodle-root/r.php.
    Affected if The r.php file exists and is accessible via the web server, indicating the vulnerable component is present.
  3. Check web server directory listing configuration
    Review your Apache (httpd.conf, .htaccess) or Nginx server configuration for Options Indexes or autoindex directives. Verify whether directory listing is enabled or disabled for the Moodle web root.
    Affected if Directory listing (Options Indexes or autoindex on) is enabled on the web server for the Moodle directory, allowing internal paths to be exposed.
  4. Inspect HTTP security header configuration
    Examine your web server configuration or Moodle config.php for missing or misconfigured security headers such as X-Frame-Options, Content-Security-Policy, and error handling directives. Test by making a request to r.php with missing headers and observing server response.
    Affected if Security headers are missing or misconfigured, allowing the server to fall back to directory listing behavior during error conditions.

A user is affected if their installed Moodle version falls within 4.5.0 to 4.5.6 or 5.0.0 to 5.0.2 AND the web server allows directory listings or lacks proper HTTP security headers, enabling path disclosure through r.php error conditions.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 4.5.7 / 5.0.3 or later
Fixed in 4.5.75.0.3
Interim mitigation

Configure web server (Apache/Nginx) to suppress directory listings and ensure proper HTTP security headers are set to prevent information disclosure during error conditions.

Recommended fix High confidence

Moodle 4.5.7 (for 4.5.x branches) or Moodle 5.0.3 (for 5.x.x branches)

  1. 1. Back up your Moodle database and entire codebase before proceeding
  2. 2. Determine your current Moodle branch (4.5.x or 5.x.x)
  3. 3. For Moodle 4.5.x: Download version 4.5.7 from the official Moodle downloads page
  4. 4. For Moodle 5.x.x: Download version 5.0.3 from the official Moodle downloads page
  5. 5. Extract the new version and replace the existing Moodle installation files
  6. 6. Run the Moodle upgrade process via command line (php admin/cli/upgrade.php) or through the web interface
  7. 7. Clear all Moodle caches (Site Administration > Development > Purge caches)
  8. 8. Verify the fix by testing r.php with the specific HTTP headers mentioned in the security advisory
Caveat Standard Moodle upgrade considerations apply - review the release notes and test in a staging environment before deploying to production

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Moodle Scoped from the published advisory
  • Consultation3.0 h
  • Implementation4.0 h
  • Testing2.0 h
  • Review / QA1.0 h
10.0 hours of engineering $1,800
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $2,880.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2025-62396 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2025-62396 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data