CVE-2022-45150: Moodle Reflected Cross-Site Scripting Vulnerability in Policy Tool
Summary
CVE-2022-45150: Moodle reflected cross-site scripting vulnerability in policy tool. Affects moodle/moodle across 3 version ranges.
>= 3.9, < 3.9.18
>= 3.11, < 3.11.11
>= 4.0, < 4.0.5
Fixed in 3.9.18, 3.11.11 or 4.0.5, depending on the release line you run. How to fix ↓
Also tracked for
- moodle · Bitnami
The same CVE-2022-45150 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
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.
No signup required · Results in about 60 seconds
Background
Moodle is an open-source learning management system (LMS) used by educational institutions to create and manage online courses. It provides a platform for educators to deliver content, interact with students, and assess their progress. The vulnerability affects versions 3.9 to 3.9.18, 3.11 to 3.11.11, and 4.0 to 4.0.5 of the Moodle package.
Vulnerability Detail
A reflected cross-site scripting vulnerability was discovered in Moodle's policy tool. This vulnerability arises from inadequate sanitization of user-supplied data. An attacker can exploit this flaw by tricking a user into clicking on a specially crafted link. When the victim opens the link, arbitrary HTML and script code can be executed in the user's browser within the context of the vulnerable Moodle website. This vulnerability enables cross-site scripting (XSS) attacks, potentially leading to unauthorized access to sensitive information and the modification of web pages.
How To Fix
Fixed versions by release line
The minimum fixed version depends on the release line you run.
-
>= 3.9, < 3.9.183.9.18composer require moodle/moodle:3.9.18 -
>= 3.11, < 3.11.113.11.11composer require moodle/moodle:3.11.11 -
>= 4.0, < 4.0.54.0.5composer require moodle/moodle:4.0.5
Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →
Workaround
There is no known workaround for this vulnerability at the moment.
Conclusion
The reflected cross-site scripting vulnerability in Moodle's policy tool can be exploited by attackers to execute arbitrary code in a victim's browser. Upgrading to the latest patched version of Moodle is the recommended solution. For further assistance and support in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for moodle/moodle →
FAQ
Moodle is an open-source learning management system used for online course management.
A reflected cross-site scripting vulnerability occurs when user-supplied data is not properly sanitized and is directly embedded in web pages, allowing an attacker to execute arbitrary code in a victim's browser.
An attacker can exploit this vulnerability by tricking a user into clicking on a specially crafted link that contains malicious code. When the user opens the link, the code is executed in their browser within the context of the vulnerable Moodle website.
This vulnerability can allow an attacker to gain unauthorized access to sensitive information and modify web pages, potentially leading to data breaches and unauthorized actions.
Yes, it is recommended to upgrade to the latest patched version of Moodle to fix this vulnerability.
Related vulnerabilities
Recent vulnerabilities recorded for moodle/moodle.