MoodleCMS

CVE-2024-34008

HIGH · 8.8 CVSS v3.1 Published 2024-05-31
Fix available
A fix is available. Upgrade to 4.1.10 / 4.2.7 or later.
See remediation →
95/100
Remediation priority · Urgent
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
Actions in the admin management of analytics models did not include the necessary token to prevent a CSRF risk.

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

This is a Cross-Site Request Forgery (CSRF) vulnerability in the admin management interface for analytics models. The affected actions lack anti-CSRF tokens, allowing authenticated administrators to be tricked into performing unintended administrative actions via malicious requests from other sites.

MitigationImplement anti-CSRF tokens on all admin management actions for analytics models, typically by adding token validation to form submissions and AJAX requests in the admin interface.

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.0, < 4.3.4>= 4.1, < 4.1.10>= 4.2, < 4.2.7

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
Unchanged
Confidentiality
High
Integrity
High
Availability
High

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

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. Determine installed Moodle version
    Log into the Moodle admin interface and view the page footer, or check the version.php file in the Moodle root directory (look for $Moodle for the version number)
    Affected if The version falls within the affected ranges: 4.0 to 4.3.3, 4.1 to 4.1.9, or 4.2 to 4.2.6
  2. Confirm analytics tool is enabled
    Navigate to Site Administration > Plugins > Analytics or access /admin/tool/analytics/ to verify the analytics plugin is installed and active
    Affected if The analytics plugin is enabled and accessible to administrators
  3. Inspect analytics model management code for token validation
    Examine the PHP files handling admin actions for analytics models (typically in /admin/tool/analytics/ directory). Look for presence or absence of $SESSION->get('sesskey') or require statement calling confirm_sesskey() in form handling and action processing scripts
    Affected if The code handling analytics model management actions does not validate anti-CSRF tokens (confirm_sesskey is not called)

You are affected if your Moodle version is 4.0-4.3.3, 4.1-4.1.9, or 4.2-4.2.6 AND the analytics admin interface is enabled AND the relevant admin actions for analytics models lack CSRF token validation in the code.

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.10 / 4.2.7 / 4.3.4 or later
Fixed in 4.1.104.2.74.3.4
Interim mitigation

Implement anti-CSRF tokens on all admin management actions for analytics models, typically by adding token validation to form submissions and AJAX requests in the admin interface.

Recommended fix High confidence

Moodle 4.3.4 (for 4.0-4.3.x branches), Moodle 4.2.7 (for 4.2.x branch), or Moodle 4.1.10 (for 4.1.x branch)

  1. 1. Back up your Moodle database and filesystem (especially the moodledata directory) before proceeding.
  2. 2. Download the appropriate Moodle version for your current installation from moodle.org (e.g., moodle-4.3.4.zip or moodle-4.3.4.tar.gz).
  3. 3. Place your Moodle site into maintenance mode via Site Administration > Server > Maintenance Mode, or by creating a maintenance.html file in the Moodle root directory.
  4. 4. Replace the existing Moodle files with the new version files, preserving your config.php file and any custom code in local/ or theme/ directories.
  5. 5. Run the Moodle upgrade script by accessing your site URL (e.g., yourmoodle.com) in a web browser - the upgrade will auto-detect and prompt you to complete the process.
  6. 6. After successful upgrade, verify that the analytics models functionality in Site Administration > Server > Analytics is working correctly.
  7. 7. Exit maintenance mode and clear all Moodle caches via Site Administration > Development > Purge caches.
Caveat Review the release notes for your target version to check for any breaking changes or deprecations, particularly around analytics model functionality and web services.

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

Fix this in Moodle Scoped from the published advisory
  • Consultation2.0 h
  • Implementation8.0 h
  • Testing4.0 h
  • Review / QA2.0 h
16.0 hours of engineering $2,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 $4,480.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

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