CVE-2022-45150: Moodle Reflected Cross-Site Scripting Vulnerability in Policy Tool

moodle/moodle Updated 02 Oct 2025

Summary

23/11/2022
Yes i
Moderate
6.1

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

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.

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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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.18 3.9.18
    composer require moodle/moodle:3.9.18
  • >= 3.11, < 3.11.11 3.11.11
    composer require moodle/moodle:3.11.11
  • >= 4.0, < 4.0.5 4.0.5
    composer 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 →

Share this vulnerability

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.

How To Fix

Fixed versions by release line

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

  • >= 3.9, < 3.9.18 3.9.18
    composer require moodle/moodle:3.9.18
  • >= 3.11, < 3.11.11 3.11.11
    composer require moodle/moodle:3.11.11
  • >= 4.0, < 4.0.5 4.0.5
    composer 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 →

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