MoodleCMS

CVE-2024-34004

MEDIUM · 6.5 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 →
71/100
Remediation priority · Elevated
Remotely reachable 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
In a shared hosting environment that has been misconfigured to allow access to other users' content, a Moodle user with both access to restore wiki modules and direct access to the web server outside of the Moodle webroot could execute a local file include.

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

In Moodle, a user with permissions to restore wiki modules combined with direct access to the web server filesystem outside the Moodle webroot can exploit a local file inclusion vulnerability. This requires a misconfigured shared hosting environment that allows users to access other users' content directories.

MitigationEnsure proper filesystem isolation in shared hosting environments to prevent cross-user access, and restrict or audit the wiki module restore functionality in Moodle.

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.10>= 4.2.0, < 4.2.7>= 4.3.0, < 4.3.4

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
High
User interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:H/I:H/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 Site Administration > Server > Environment page, or check the version.php file in the Moodle root directory for the $release or $version variable
    Affected if The installed version falls within < 4.1.10, >= 4.2.0 and < 4.2.7, or >= 4.3.0 and < 4.3.4
  2. Confirm wiki module is installed and accessible
    Navigate to Site Administration > Plugins > Plugins overview and locate the Wiki module, or check for wiki capability in user role permissions under Site Administration > Users > Permissions > Define roles
    Affected if The wiki module is present and the user account in question has the moodle/restore:restore capability or equivalent wiki restore permissions
  3. Verify user has wiki restore permissions
    Check the user's assigned roles for the moodle/restore:restore capability, or navigate to Site Administration > Users > Permissions > Assign system roles and review the user's role definitions
    Affected if The user has the ability to restore wiki modules via the restore functionality
  4. Determine hosting environment type
    Inspect the web server document root configuration and check if the Moodle data directory (typically 'moodledata' outside webroot) has permissions that could allow cross-user access, or consult with hosting provider about whether this is a shared hosting environment
    Affected if The server is a shared hosting environment where users can potentially access files outside their own Moodle webroot directory

You are affected if your Moodle version is vulnerable AND you have the wiki module with restore permissions enabled AND you are on a misconfigured shared hosting environment that permits filesystem access beyond the Moodle webroot.

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

Ensure proper filesystem isolation in shared hosting environments to prevent cross-user access, and restrict or audit the wiki module restore functionality in Moodle.

Recommended fix High confidence

Moodle 4.1.10, 4.2.7, or 4.3.4 (or latest 4.x/4.1.x/4.2.x/4.3.x stable release)

  1. Identify your current Moodle version from the admin dashboard (Site administration > Server > PHP info or footer)
  2. Backup your Moodle database and entire Moodle directory (including moodledata) before proceeding
  3. Download the appropriate fixed version (4.1.10+, 4.2.7+, or 4.3.4+) from moodle.org/downloads
  4. Place your site in maintenance mode via Site administration > Server > Maintenance mode
  5. Replace all Moodle core files with the new version files, preserving your config.php and any custom modifications
  6. Run the upgrade process by accessing the site URL (e.g., yourmoodle.com) which will trigger database schema updates
  7. Verify the upgrade completed successfully by logging in and checking the version in Site administration > Server > Environment
  8. Review the Moodle security notes for the new version for any additional recommended actions
Caveat Standard Moodle upgrades are generally low-risk but always test in staging first; ensure PHP version compatibility with the target release

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

Fix this in Moodle Scoped from the published advisory
  • Consultation6.0 h
  • Implementation10.0 h
  • Testing6.0 h
  • Review / QA4.0 h
26.0 hours of engineering $4,620
Get the upgrade done

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

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

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