CVE-2022-30596: Moodle - Stored XSS Risk in ID Numbers Display

moodle Updated 02 Oct 2025

Summary

06/03/2024
Yes i
Medium
Not published

CVE-2022-30596: A flaw was found in moodle where ID numbers displayed when bulk allocating markers to assignments required additional sanitizing to prevent a stored XSS risk. Affects moodle across 4 version ranges.

>= 3.9.0, < 3.9.14 >= 3.10.0, < 3.10.11 >= 3.11.0, < 3.11.7 >= 4.0.0, < 4.0.1

Fixed in 4 releases; the minimum fixed version depends on the release line you run. How to fix ↓

Also tracked for

The same CVE-2022-30596 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

Sponsored MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Moodle is an open-source learning management system widely used for online education. It provides a platform for educators to create and manage courses, assignments, and assessments. Moodle is known for its flexibility, extensibility, and user-friendly interface. However, a vulnerability has been identified in Moodle that exposes a stored cross-site scripting (XSS) risk when displaying ID numbers during bulk allocation of markers to assignments.

Vulnerability Detail

The flaw in Moodle arises from insufficient sanitization of ID numbers, which can be exploited to execute malicious scripts in the context of other users. An attacker could craft a specially crafted ID number that, when displayed, would trigger the execution of arbitrary JavaScript code in the victim's browser. This could lead to various security risks, including session hijacking, data theft, and unauthorized actions on behalf of the victim. The vulnerability affects Moodle versions 3.9.0 to 3.9.14, 3.10.0 to 3.10.11, and 3.11.0 to 3.11.7. Additionally, Moodle 4.0.0 is also impacted.

How To Fix

Fixed versions by release line

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

  • >= 3.9.0, < 3.9.14 3.9.14
  • >= 3.10.0, < 3.10.11 3.10.11
  • >= 3.11.0, < 3.11.7 3.11.7
  • >= 4.0.0, < 4.0.1 4.0.1

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 display of ID numbers in the bulk allocation of markers to assignments. This can be achieved by modifying the relevant Moodle configuration settings or by applying a custom code change. However, it is strongly advised to apply the official patch or upgrade to the latest version as soon as possible.

Conclusion

The identified vulnerability in Moodle exposes a stored XSS risk when displaying ID numbers during bulk allocation of markers to assignments. This flaw can be exploited by attackers to execute arbitrary JavaScript code in the context of other users, potentially leading to various security risks. To mitigate this vulnerability, it is crucial to update Moodle to the latest patched version or apply the official fix provided by the Moodle development team. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for moodle →

Share this vulnerability

FAQ

Moodle is an open-source learning management system used for online education. It provides a platform for educators to create and manage courses, assignments, and assessments.

A stored cross-site scripting (XSS) vulnerability is a type of security flaw that allows an attacker to inject malicious scripts into a website or application. These scripts are then executed by unsuspecting users, leading to potential data theft, session hijacking, or unauthorized actions.

The vulnerability affects Moodle versions 3.9.0 to 3.9.14, 3.10.0 to 3.10.11, 3.11.0 to 3.11.7, and 4.0.0.

To fix this vulnerability, it is recommended to update Moodle to the latest patched version available. The Moodle development team has addressed this issue in versions 3.9.14, 3.10.11, 3.11.7, and subsequent releases.

As a temporary workaround, administrators can disable the display of ID numbers in the bulk allocation of markers to assignments. However, it is strongly advised to apply the official patch or upgrade to the latest version as soon as possible.

Related vulnerabilities

Recent vulnerabilities recorded for moodle.

How To Fix

Fixed versions by release line

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

  • >= 3.9.0, < 3.9.14 3.9.14
  • >= 3.10.0, < 3.10.11 3.10.11
  • >= 3.11.0, < 3.11.7 3.11.7
  • >= 4.0.0, < 4.0.1 4.0.1

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