CVE-2022-45149
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 · uneditedA vulnerability was found in Moodle which exists due to insufficient validation of the HTTP request origin in course redirect URL. A user's CSRF token was unnecessarily included in the URL when being redirected to a course they have just restored. A remote attacker can trick the victim to visit a specially crafted web page and perform arbitrary actions on behalf of the victim on the vulnerable website. This flaw allows an attacker to perform cross-site request forgery attacks.
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 · high confidenceMoodle contains a CSRF vulnerability where the anti-CSRF token is unnecessarily exposed in the URL during course restoration redirects. Since tokens in URL parameters can be leaked via browser history, logs, and referrer headers, an attacker can craft a malicious page that tricks an authenticated user into performing unintended actions on the vulnerable site.
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>= 3.9.0, < 3.9.18>= 3.11.0, < 3.11.11>= 4.0.0, < 4.0.5= 35= 36= 37CVSS 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
- Unchanged
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/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 checksWork through these to decide whether this CVE applies to you.
-
Determine installed Moodle versionCheck the version.php file in your Moodle installation root directory, or navigate to Site Administration > Server > Environment to view the installed Moodle version.Affected if The installed version falls within: 3.9.0 to 3.9.17, 3.11.0 to 3.11.10, or 4.0.0 to 4.0.4.
-
Verify course restoration feature is accessibleConfirm that the course restoration functionality is enabled in your Moodle instance. Check under Site Administration > Courses > Course defaults or by attempting to access the restore function as an administrator.Affected if Course restoration is enabled and accessible to authenticated users.
-
Check for CSRF token exposure in redirect URLsPerform a course restoration operation while monitoring browser developer tools Network tab or HTTP proxy. Observe whether the anti-CSRF token (sesskey) appears in redirect URL parameters rather than in POST data or HTTP headers.Affected if The sesskey or token parameter is visible in the URL string during or after the course restoration redirect sequence.
-
Review HTTP server access logs for token leakageExamine web server access logs (Apache, Nginx) for requests containing 'sesskey=' or 'token=' in URL query parameters, particularly those referencing course restore functionality.Affected if URL query parameters containing CSRF tokens are logged by the web server.
Your environment is affected if the installed Moodle version matches the vulnerable ranges AND the course restoration feature is accessible to users, as this is where the CSRF token gets exposed in redirect URLs.
Generated from the published advisory. Verify against your own configuration.
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 · scoped3.9.183.11.114.0.5
Apply the vendor patch for Moodle to ensure CSRF tokens are not exposed in redirect URLs and that proper HTTP Origin header validation is enforced.
Moodle 3.9.18, 3.11.11, or 4.0.5 (or later respective releases)
- 1. Back up your current Moodle database and codebase before proceeding with the upgrade
- 2. Download the appropriate fixed version of Moodle for your current branch: 3.9.18, 3.11.11, or 4.0.5 (or later)
- 3. Place your server in maintenance mode via Site Administration > Server > Maintenance Mode
- 4. Replace your Moodle code directory with the new version files, preserving your config.php and any custom plugins
- 5. Run the upgrade process by accessing the Moodle site in your browser
- 6. Complete any database upgrades when prompted
- 7. Exit maintenance mode once upgrades are complete
- 8. Verify the course redirect functionality works correctly
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation3.0 h
- Implementation6.0 h
- Testing3.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,984.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2022-45149 — 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 sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2022-45149 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
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.
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.
- 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