MoodleCMS

CVE-2024-34003

MEDIUM · 5.9 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 →
63/100
Remediation priority · Elevated
Remotely reachable

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 workshop 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

This is a local file inclusion vulnerability in Moodle that requires a specific combination of misconfigurations: a shared hosting environment allowing cross-user content access, the attacker having access to restore workshop modules, and direct filesystem access outside the Moodle webroot. An authenticated user with these conditions could include and execute arbitrary local files on the server.

MitigationFix the shared hosting environment configuration to properly isolate user content and prevent access to other users' files. Restrict or properly sandbox the workshop module restore functionality and ensure the web server is configured to prevent access outside the Moodle webroot.

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

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

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
    Navigate to Site administration > Server > Environment or check the version.php file in the Moodle root directory (look for $version variable)
    Affected if Version is < 4.1.10 OR >= 4.2.0 and < 4.2.7 OR >= 4.3.0 and < 4.3.4
  2. Identify hosting environment type
    Check if this is a shared hosting server where multiple user accounts can access each other's files. Look for the data directory permissions and check if $CFG->dataroot is accessible by multiple Moodle installations or user accounts
    Affected if Moodle is installed on shared hosting where cross-user file access is possible (multiple users can read/write to the same data directory)
  3. Verify workshop module restore access
    Check if the authenticated user role has the capability to restore workshop activities. Go to Site administration > Users > Permissions > Define roles and verify if regular authenticated users can access workshop restore functionality, or check if the 'mod/workshop:restore' capability is assigned to user roles
    Affected if Users with basic authenticated access can restore workshop modules, or workshop restore functionality is enabled for non-admin users
  4. Confirm filesystem access outside webroot
    Review the web server (Apache/Nginx) configuration and the $CFG->dataroot setting in config.php. Verify whether the Moodle data directory is located outside the webroot and if the web server can access files outside the Moodle installation directory
    Affected if The web server configuration allows direct filesystem access outside the Moodle webroot, or $CFG->dataroot is set to a path accessible via the web server

A site is affected if it runs a vulnerable Moodle version AND operates in a shared hosting environment with cross-user file access AND allows users to restore workshop modules AND the web server can access files outside 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

Fix the shared hosting environment configuration to properly isolate user content and prevent access to other users' files. Restrict or properly sandbox the workshop module restore functionality and ensure the web server is configured to prevent access outside the Moodle webroot.

Recommended fix High confidence

Moodle 4.1.10, 4.2.7, or 4.3.4 (depending on your current branch)

  1. Identify your current Moodle version by checking the admin dashboard or version.php file
  2. Determine which branch you are on (4.1.x, 4.2.x, or 4.3.x)
  3. Backup your Moodle database and moodledata directory before upgrading
  4. Download the appropriate fixed version from moodle.org (4.1.10, 4.2.7, or 4.3.4)
  5. Extract the new Moodle files to your server, replacing existing files
  6. Run the Moodle upgrade script by visiting your site's admin URL
  7. Verify the upgrade completed successfully and test core functionality
  8. If using shared hosting, ensure the hosting environment is properly configured to prevent access to other users' content outside the Moodle webroot
Caveat Standard Moodle upgrade precautions apply - review release notes for any between-version changes, test in staging environment first

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

Fix this in Moodle Scoped from the published advisory
  • Consultation3.0 h
  • Implementation4.0 h
  • Testing2.0 h
  • Review / QA1.0 h
10.0 hours of engineering $1,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 $2,880.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

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