CVE-2022-45150
Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.
NVD · uneditedA reflected cross-site scripting vulnerability was discovered in Moodle. This flaw exists due to insufficient sanitization of user-supplied data in policy tool. An attacker can trick the victim to open a specially crafted link that executes an arbitrary HTML and script code in user's browser in context of vulnerable website. This vulnerability may allow an attacker to perform cross-site scripting (XSS) attacks to gain access potentially sensitive information and modification of web pages.
Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.
dbcve analysis · moderate confidenceA reflected cross-site scripting (XSS) vulnerability exists in Moodle's policy tool due to insufficient sanitization of user-supplied data. An attacker can craft a malicious link that, when clicked by a victim, executes arbitrary HTML and script code in the victim's browser within the context of the vulnerable website.
Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.
Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.
NVD · CPE data>= 3.9.0, < 3.9.18>= 3.11.0, < 3.11.11>= 4.0.0, < 4.0.5= 35= 36= 37CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.
From the vector- Attack vector
- Network
- Complexity
- Low
- Privileges
- None
- User interaction
- Required
- Scope
- Changed
- Confidentiality
- Low
- Integrity
- Low
- Availability
- None
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.
dbcve checksWork through these to decide whether this CVE applies to you.
-
Determine installed Moodle versionLocate the version.php file in the Moodle lib directory or access Site Administration > Server > Environment to view the installed version numberAffected if The installed version falls within the vulnerable ranges: >= 3.9.0 and < 3.9.18, >= 3.11.0 and < 3.11.11, or >= 4.0.0 and < 4.0.5
-
Verify policy tool is accessibleNavigate to Site Administration > Users > Policies and acceptances, or directly access /admin/tool/policy/ to confirm the policy tool is enabled and accessibleAffected if The policy tool is enabled and users can access the policy acceptance page, allowing them to click on crafted links containing malicious payloads
-
Check for unpatched policy handler filesExamine the file /admin/tool/policy/classes/output/renderer.php or the policy acceptance page handler for lack of proper output encoding on user-controlled parametersAffected if The code lacks proper htmlspecialchars() or equivalent encoding on parameters passed to the policy tool URL that could be reflected back to the user
A user is affected if they are running a Moodle version within the vulnerable ranges AND the policy tool component is accessible to users, allowing reflected XSS via crafted URLs.
Generated from the published advisory. Verify against your own configuration.
Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.
dbcve · scoped3.9.183.11.114.0.5
Apply the official Moodle security patch which implements proper input sanitization and output encoding in the policy tool component to neutralize the XSS vector.
Moodle 3.9.18, 3.11.11, or 4.0.5 (depending on your current branch)
- 1. Back up your Moodle database and moodledata directory before upgrading
- 2. Back up your Moodle source code directory
- 3. Download the appropriate Moodle fixed version (3.9.18, 3.11.11, or 4.0.5) from download.moodle.org
- 4. Replace the Moodle source code files with the new version
- 5. Run the Moodle upgrade script by accessing your site via browser (e.g., https://yourmoodleurl/admin/index.php)
- 6. Follow the on-screen upgrade prompts to complete the upgrade
- 7. Clear all Moodle caches after upgrade (Site Administration > Development > Purge caches)
- 8. Verify the policy tool functions correctly and test that XSS payloads are no longer executable
Generated from the published advisory — verify against the referenced sources before acting.
- Consultation2.0 h
- Implementation4.0 h
- Testing2.0 h
- Review / QA2.0 h
An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $2,848.
Scan for this in your stack
Free · runs locallyCheck whether your project pulls in CVE-2022-45150 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.
References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.
Primary sourcesPractitioner notes
ContributedPeer-ranked notes from engineers who’ve handled CVE-2022-45150 in production — separate from our analysis above.
The advisory tells you what broke. It rarely tells you what actually worked. If you’ve dealt with this one, that detail is what the next engineer is searching for.
- The version that genuinely resolved it — not the one the vendor claimed
- A config change or rule that shut the vector down
- A gotcha in the upgrade path that cost you an afternoon
No notes yet
Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.
A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.
- Verified mitigations, workarounds, and config changes
- Version or environment caveats, and links to real fixes
- No weaponised exploit code, or anything meant to cause harm
- No spam, self-promotion, credentials, or personal data