CVE-2024-33997: Moodle stored Cross-site Scripting (XSS)

moodle/moodle Updated 02 Oct 2025

Summary

31/05/2024
Yes i
Moderate
6.1

CVE-2024-33997: Moodle stored Cross-site Scripting (XSS). Affects moodle/moodle across 3 version ranges.

< 4.1.10 >= 4.2.0, < 4.2.7 >= 4.3.0, < 4.3.4

Fixed in 4.1.10, 4.2.7 or 4.3.4, depending on the release line you run. How to fix ↓

Also tracked for

The same CVE-2024-33997 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Moodle is an open-source learning management system (LMS) used by educational institutions to create and deliver online courses. It provides a platform for educators to manage course materials, interact with students, and facilitate online learning. Moodle is written in PHP and utilizes a modular architecture to support various plugins and extensions. This vulnerability affects the Moodle package and specifically impacts the equation editor feature.

Vulnerability Detail

The vulnerability in Moodle arises from insufficient sanitization of user input when opening the equation editor. This can lead to a stored Cross-site Scripting (XSS) risk when editing another user's equation. An attacker could exploit this vulnerability by injecting malicious code into the equation editor, which would then be executed when viewed by other users. This could potentially allow the attacker to steal sensitive information, perform actions on behalf of the user, or manipulate the content of the affected Moodle instance.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 4.1.10 4.1.10
    composer require moodle/moodle:4.1.10
  • >= 4.2.0, < 4.2.7 4.2.7
    composer require moodle/moodle:4.2.7
  • >= 4.3.0, < 4.3.4 4.3.4
    composer require moodle/moodle:4.3.4

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

As a temporary workaround, administrators can disable the equation editor feature in Moodle until the package can be updated. This can be done by modifying the configuration settings or disabling the corresponding plugin. However, it is strongly advised to apply the official fix as soon as possible to restore full functionality and mitigate the vulnerability.

Conclusion

The stored Cross-site Scripting (XSS) vulnerability in Moodle's equation editor poses a moderate risk to the security of affected installations. It is crucial to promptly update the Moodle package to the recommended versions or apply the provided workaround to mitigate the vulnerability. Regularly monitoring for security updates and following best practices for secure coding and configuration can help maintain the integrity of Moodle instances. For further support and assistance in vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for moodle/moodle →

Share this vulnerability

FAQ

Moodle is an open-source learning management system (LMS) used by educational institutions to create and deliver online courses.

Cross-site Scripting (XSS) is a type of security vulnerability that allows attackers to inject malicious scripts into web pages viewed by other users.

An attacker can exploit this vulnerability by injecting malicious code into the equation editor, which will be executed when viewed by other users.

The consequences of this vulnerability include the potential theft of sensitive information, unauthorized actions performed on behalf of users, and manipulation of Moodle content.

To protect your Moodle instance, it is important to update to the latest version of the Moodle package and regularly apply security patches. Additionally, consider implementing web application firewalls and input validation mechanisms.

Related vulnerabilities

Recent vulnerabilities recorded for moodle/moodle.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • < 4.1.10 4.1.10
    composer require moodle/moodle:4.1.10
  • >= 4.2.0, < 4.2.7 4.2.7
    composer require moodle/moodle:4.2.7
  • >= 4.3.0, < 4.3.4 4.3.4
    composer require moodle/moodle:4.3.4

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback