MoodleCMS

CVE-2026-26046

HIGH · 7.2 CVSS v3.1 Published 2026-02-21
Fix available
A fix is available. Upgrade to 4.5.9 / 5.0.5 or later.
See remediation →
78/100
Remediation priority · High
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
A vulnerability was found in a Moodle TeX filter administrative setting where insufficient sanitization of configuration input could allow command injection. On sites where the TeX filter is enabled and ImageMagick is installed, a maliciously crafted setting value entered by an administrator could result in unintended system command execution. While exploitation requires administrative privileges, successful compromise could affect the entire Moodle server.

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 confidence

A command injection vulnerability exists in Moodle's TeX filter due to insufficient sanitization of administrative configuration settings. When the TeX filter is enabled and ImageMagick is installed, a malicious administrator can inject arbitrary system commands through the filter configuration, executing them with web server privileges.

MitigationDisable the TeX filter if not required; if needed, restrict administrative access strictly and apply vendor patches when available. Verify ImageMagick installation status as a prerequisite for this attack.

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.5.9>= 5.0.0, < 5.0.5>= 5.1.0, < 5.1.2

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
High

CVSS:3.1/AV:N/AC:L/PR:H/UI:N/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. Check installed Moodle version
    Navigate to Site administration > Server > System paths or access /admin/environment.php to view the Moodle version number
    Affected if The version falls within < 4.5.9, >= 5.0.0 and < 5.0.5, or >= 5.1.0 and < 5.1.2
  2. Verify TeX filter status
    Go to Site administration > Plugins > Filters > Manage filters and check if TeX filter is enabled
    Affected if TeX filter is set to On or Yes
  3. Confirm ImageMagick installation
    Check if ImageMagick is installed on the server by running 'convert -version' via command line or checking the ImageMagick path in Site administration > Server > System paths
    Affected if ImageMagick is installed and a path is configured in Moodle
  4. Review administrator accounts
    Access Site administration > Users > Permissions > Assign system roles and review the list of users with Administrator role
    Affected if Multiple users have Administrator role or untrusted accounts exist with admin privileges
  5. Inspect TeX filter configuration
    Navigate to Site administration > Plugins > Filters > TeX filter and examine the LaTeX renderer and ImageMagick path settings for any unexpected values
    Affected if Configuration contains unusual paths or commands

Your environment is affected if running a vulnerable Moodle version AND the TeX filter is enabled AND ImageMagick is installed, allowing any administrator to inject commands through filter settings.

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.5.9 / 5.0.5 / 5.1.2 or later
Fixed in 4.5.95.0.55.1.2
Interim mitigation

Disable the TeX filter if not required; if needed, restrict administrative access strictly and apply vendor patches when available. Verify ImageMagick installation status as a prerequisite for this attack.

Recommended fix High confidence

Moodle 4.5.9 (or later 4.5.x), 5.0.5 (or later 5.0.x), or 5.1.2 (or later 5.1.x) depending on current branch

  1. 1. Identify the current Moodle version by navigating to Site Administration > Server > Environment or checking the footer of any Moodle page.
  2. 2. If running 4.5.x (below 4.5.9), plan upgrade to Moodle 4.5.9 or later.
  3. 3. If running 5.0.x (below 5.0.5), plan upgrade to Moodle 5.0.5 or later.
  4. 4. If running 5.1.0-5.1.1, plan upgrade to Moodle 5.1.2 or later.
  5. 5. Before upgrading, take a complete backup of the Moodle database and moodledata directory.
  6. 6. Also backup the Moodle source code directory.
  7. 7. Follow the standard Moodle upgrade process: place site in maintenance mode, replace source files with new version, run the upgrade script via CLI (php admin/cli/upgrade.php) or web interface.
  8. 8. After upgrade, verify the TeX filter functionality works correctly.
Caveat Standard Moodle minor version upgrades typically have minimal breaking changes; always review the release notes for the target version for any notable changes

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

Fix this in Moodle Scoped from the published advisory
  • Consultation2.0 h
  • Implementation4.0 h
  • Testing3.0 h
  • Review / QA2.0 h
11.0 hours of engineering $1,930
Get the upgrade done

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

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

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