MoodleCMS

CVE-2025-67852

MEDIUM · 6.1 CVSS v3.1 Published 2026-02-03
Fix available
A fix is available. Upgrade to 4.1.22 / 4.4.11 or later.
See remediation →
68/100
Remediation priority · Elevated
Remotely reachable No privileges

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
A flaw was found in Moodle. An open redirect vulnerability in the OAuth login flow allows a remote attacker to redirect users to attacker-controlled pages after they have successfully authenticated. This occurs due to insufficient validation of redirect parameters, which could lead to phishing attacks or information disclosure.

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

An open redirect vulnerability exists in Moodle's OAuth 2 authentication flow where the redirect parameter passed during the OAuth callback is not properly validated before redirecting authenticated users. After successful authentication, users are redirected to a URL controlled by the attacker, enabling phishing attacks or potential session token exposure to malicious sites.

MitigationImplement strict whitelist-based validation of redirect URIs in the OAuth callback handler, ensuring only pre-registered and trusted redirect URLs are allowed. Additionally, apply CSRF tokens to the OAuth state parameter to prevent parameter tampering.

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.1.22>= 4.4.0, < 4.4.11>= 4.5.0, < 4.5.8>= 5.0.0, < 5.0.4= 5.1.0

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
Required
Scope
Changed
Confidentiality
Low
Integrity
Low
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/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
    Access the site administration panel and navigate to 'Server > Environment' or check the version.php file in the Moodle root directory (look for $version variable). Alternatively, access /admin/environment.php via web browser.
    Affected if The installed version falls within any of these ranges: < 4.1.22; >= 4.4.0 and < 4.4.11; >= 4.5.0 and < 4.5.8; >= 5.0.0 and < 5.0.4; or equals 5.1.0
  2. Confirm OAuth 2 authentication is configured
    Navigate to Site Administration > Plugins > Authentication > Manage Authentication and check if any OAuth 2 related plugins (such as 'OAuth 2' or 'Microsoft'/'Google'/'Facebook' OAuth2) are enabled. Alternatively, check the 'auth' table in the Moodle database for OAuth-related auth plugins.
    Affected if OAuth 2 authentication plugins are enabled and configured on the Moodle instance
  3. Verify OAuth service redirect URI configuration
    Navigate to Site Administration > Plugins > Authentication > OAuth 2 services (or /admin/oauth2services.php). Examine each configured OAuth service and check whether redirect URIs are explicitly whitelisted or if the configuration allows arbitrary redirect parameters.
    Affected if OAuth services are configured without strict whitelist-based redirect URI validation, or if custom redirect parameters can be passed during the OAuth callback
  4. Inspect OAuth callback handler behavior
    If possible, review the source code in /auth/oauth2/ directory, specifically the callback handler (typically auth/oauth2/callback.php). Check whether the redirect parameter from the OAuth callback is validated against a predefined whitelist before performing the redirect.
    Affected if The OAuth callback handler allows arbitrary redirect URLs or does not validate the redirect parameter against pre-registered trusted URIs

A user is affected if their Moodle installation version is in the vulnerable range AND OAuth 2 authentication is enabled with insufficient redirect URI validation in the callback handler.

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.1.22 / 4.4.11 / 4.5.8 or later
Fixed in 4.1.224.4.114.5.8
Interim mitigation

Implement strict whitelist-based validation of redirect URIs in the OAuth callback handler, ensuring only pre-registered and trusted redirect URLs are allowed. Additionally, apply CSRF tokens to the OAuth state parameter to prevent parameter tampering.

Recommended fix High confidence

Minimum: 4.1.22 (for 4.1.x), 4.4.11 (for 4.4.x), 4.5.8 (for 4.5.x), or 5.0.4 (for 5.0.x)

  1. 1. Identify your current Moodle version by checking the Moodle administration site or version.php file
  2. 2. Determine which version branch you are running (4.1.x, 4.4.x, 4.5.x, or 5.0.x)
  3. 3. For Moodle 4.1.x: upgrade to version 4.1.22 or later
  4. 4. For Moodle 4.4.x: upgrade to version 4.4.11 or later
  5. 5. For Moodle 4.5.x: upgrade to version 4.5.8 or later
  6. 6. For Moodle 5.0.x: upgrade to version 5.0.4 or later
  7. 7. After upgrade, verify the OAuth login flow works correctly and test that redirect parameters are properly validated
  8. 8. Review Moodle release notes for any additional migration requirements
Caveat Standard Moodle upgrade risks apply - backup database and files before upgrading; review migration notes for your version branch

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

Fix this in Moodle Scoped from the published advisory
  • Consultation3.0 h
  • Implementation6.0 h
  • Testing4.0 h
  • Review / QA2.0 h
15.0 hours of engineering $2,640
Get the upgrade done

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

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2025-67852 — 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-67852 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