MoodleCMS

CVE-2022-35652

MEDIUM · 6.1 CVSS v3.1 Published 2022-07-25
Fix available
A fix is available. Upgrade to 3.9.15 / 3.11.8 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
An open redirect issue was found in Moodle due to improper sanitization of user-supplied data in mobile auto-login feature. A remote attacker can create a link that leads to a trusted website, however, when clicked, it redirects the victims to arbitrary URL/domain. Successful exploitation of this vulnerability may allow a remote attacker to perform a phishing attack and steal potentially sensitive information.

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 mobile auto-login feature due to improper sanitization of user-supplied data. An attacker can craft malicious links that appear to point to a trusted Moodle site but redirect victims to arbitrary external domains, enabling phishing attacks.

MitigationImplement strict validation of redirect URLs in the mobile auto-login feature to ensure only trusted domains within the Moodle installation are allowed; apply output encoding and verify the destination URL before performing any redirect.

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:>= 3.9.0, < 3.9.15>= 3.11.0, < 3.11.8>= 4.0.0, < 4.0.2
FedoraOperating system
Affected:= 35= 36

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
    Locate the version.php file in the Moodle root directory and read the $version variable, or access Site Administration > Server > Environment to view the Moodle version displayed in the interface
    Affected if The installed version falls within 3.9.0 to 3.9.14, 3.11.0 to 3.11.7, or 4.0.0 to 4.0.1
  2. Verify mobile app service is enabled
    Navigate to Site Administration > Plugins > Mobile app > Mobile settings, or inspect the 'moodlecourse' and 'moodle' services in the database table mdl_external_services where enabled = 1
    Affected if The Moodle Mobile service is enabled, allowing the auto-login feature to be accessible
  3. Check mobile auto-login redirect configuration
    Inspect the database table mdl_config for records with name like 'mobileautologin' or examine the file /lib/classes/output/mobile_renderer.php for redirect handling logic
    Affected if The mobile auto-login feature processes redirect URLs without strict domain validation
  4. Confirm Fedora package version if using packaged Moodle
    Run command: rpm -q moodle on Fedora systems
    Affected if The installed moodle package version matches Fedora 35 or 36 vulnerable releases

A user is affected if their Moodle installation version is within the vulnerable ranges AND the mobile auto-login feature is enabled and accessible.

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 3.9.15 / 3.11.8 / 4.0.2 or later
Fixed in 3.9.153.11.84.0.2
Interim mitigation

Implement strict validation of redirect URLs in the mobile auto-login feature to ensure only trusted domains within the Moodle installation are allowed; apply output encoding and verify the destination URL before performing any redirect.

Recommended fix High confidence

Moodle 3.9.15 (for 3.9.x branches), 3.11.8 (for 3.11.x branches), or 4.0.2 (for 4.0.x branches)

  1. Backup your existing Moodle database and codebase before upgrading
  2. Download the appropriate Moodle version from moodle.org (either 3.9.15, 3.11.8, or 4.0.2 depending on your current branch)
  3. Replace your existing Moodle code with the new version files, preserving your config.php and any local customizations
  4. Run the upgrade process via command line (php admin/cli/upgrade.php) or through the web interface
  5. Clear all Moodle caches after upgrade completion
  6. Verify the mobile auto-login functionality works correctly
Caveat Major version upgrades (e.g., 3.11 to 4.0) may have UI/behavior changes and require testing of custom plugins; minor version upgrades within the same branch typically have lower risk

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

Fix this in Moodle Scoped from the published advisory
  • Consultation4.0 h
  • Implementation8.0 h
  • Testing6.0 h
  • Review / QA4.0 h
22.0 hours of engineering $3,860
Get the upgrade done

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

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

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