CVE-2021-36398: Moodle - Stored XSS Risk in Web Service Token List

moodle Updated 02 Oct 2025

Summary

06/03/2024
Yes i
Medium
Not published

CVE-2021-36398: In moodle, ID numbers displayed in the web service token list required additional sanitizing to prevent a stored XSS risk. Affects moodle versions >= 3.11.0, < 3.11.1. Fixed in 3.11.1. How to fix ↓

Also tracked for

The same CVE-2021-36398 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 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 for creating and delivering online courses. It provides a wide range of features for educators and learners, including course management, content creation, and assessment tools. Moodle is widely adopted in educational institutions and organizations worldwide. However, the Moodle package version 3.11.0 is vulnerable to a stored cross-site scripting (XSS) risk in the web service token list.

Vulnerability Detail

The vulnerability in Moodle arises from insufficient sanitization of ID numbers displayed in the web service token list. This allows an attacker to inject malicious scripts into the application, which can be executed when other users view the token list. The stored XSS risk can lead to various consequences, such as unauthorized access to user data, session hijacking, and the potential for further exploitation. The vulnerability has a CVSS v3 score of 6.1 (Medium severity).

How To Fix

Minimum fixed version

3.11.1

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

No specific workaround has been provided for this vulnerability. It is advised to follow the recommended fix by updating Moodle to a patched version.

Conclusion

In conclusion, the Moodle package version 3.11.0 is vulnerable to a stored XSS risk in the web service token list. To mitigate this vulnerability, it is crucial to update Moodle to a version that includes the necessary sanitization of ID numbers. 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 creating and delivering online courses.

A stored cross-site scripting vulnerability allows an attacker to inject malicious scripts into a web application, which are then executed when other users view the affected content.

The stored XSS risk in Moodle can lead to unauthorized access to user data, session hijacking, and further exploitation of the application.

To fix this vulnerability, it is recommended to update Moodle to a version that includes the necessary sanitization of ID numbers in the web service token list.

No specific workaround has been provided for this vulnerability. Updating Moodle to a patched version is the recommended solution.

Related vulnerabilities

Recent vulnerabilities recorded for moodle.

How To Fix

Minimum fixed version

3.11.1

This is the first release that contains the fix.

Tip — Not sure which version your app runs? Vulert can match this fix to it. 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