Cross-site scripting in Moodle
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Cross-site scripting
- Confidentiality · integrity · availability
- Low · Low · None
- Fix status
- Fixed
Attack profile from CVSS 3.1 · CISA ADP. Fix status from CNA and GitHub. Impact type from CWE-79.
Summary
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.
Why it matters now
SSVC decision points
CISA ADP · SSVC 2.0.3
- Exploitation
- None
- Automatable
- No
- Technical impact
- Partial
The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.
Affected products
| Vendor | Product | Affected versions | Fixed in | Status | Source |
|---|---|---|---|---|---|
| — | Moodle | Fixed in moodle 4.0.5, moodle 3.11.11, moodle 3.9.18 | — | No fix listed | CNA |
| — | moodle/moodle (Packagist) | 3.9 to before 3.9.18 | 3.9.18 | Patch available | GHSA-6gx2-g773-hv9h |
| — | moodle/moodle (Packagist) | 3.11 to before 3.11.11 | 3.11.11 | Patch available | GHSA-6gx2-g773-hv9h |
| — | moodle/moodle (Packagist) | 4.0 to before 4.0.5 | 4.0.5 | Patch available | GHSA-6gx2-g773-hv9h |
- Moodle Vendor— Affected Fixed in moodle 4.0.5, moodle 3.11.11, moodle 3.9.18 Fixed in — No fix listed CNA
- moodle/moodle (Packagist) Vendor— Affected 3.9 to before 3.9.18 Fixed in 3.9.18 Patch available GHSA-6gx2-g773-hv9h
- moodle/moodle (Packagist) Vendor— Affected 3.11 to before 3.11.11 Fixed in 3.11.11 Patch available GHSA-6gx2-g773-hv9h
- moodle/moodle (Packagist) Vendor— Affected 4.0 to before 4.0.5 Fixed in 4.0.5 Patch available GHSA-6gx2-g773-hv9h
CPE configurations NVD · 4
| CPE | Versions | Role | Vendor |
|---|---|---|---|
| cpe:2.3:a:moodle:moodle:*:*:*:*:*:*:*:* | 3.9.0 to before 3.9.18; 3.11.0 to before 3.11.11; 4.0.0 to before 4.0.5 | Vulnerable | Moodle |
| cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* | 35 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:* | 36 | Vulnerable | Fedoraproject |
| cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:* | 37 | Vulnerable | Fedoraproject |
- cpe:2.3:a:moodle:moodle:*:*:*:*:*:*:*:* Versions 3.9.0 to before 3.9.18; 3.11.0 to before 3.11.11; 4.0.0 to before 4.0.5 Vulnerable ·Moodle
- cpe:2.3:o:fedoraproject:fedora:35:*:*:*:*:*:*:* Versions 35 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:36:*:*:*:*:*:*:* Versions 36 Vulnerable ·Fedoraproject
- cpe:2.3:o:fedoraproject:fedora:37:*:*:*:*:*:*:* Versions 37 Vulnerable ·Fedoraproject
Remediation
- Fix · GHSA-6gx2-g773-hv9h moodle/moodle (Packagist) Fixed in 3.9.18 Advisory →
- Fix · GHSA-6gx2-g773-hv9h moodle/moodle (Packagist) Fixed in 3.11.11 Advisory →
- Fix · GHSA-6gx2-g773-hv9h moodle/moodle (Packagist) Fixed in 4.0.5 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2022-45150
- 2026-10-03 Alias added: GHSA-6gx2-g773-hv9h
References
Advisory 4
Other 7
- 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://github.com/moodle/moodle
- https://lists.fedoraproject.org/archives/list/[email protected]/message/2DHYIIAUXUBHMBEDYU7TYNZXEN2W2SA2
- https://lists.fedoraproject.org/archives/list/[email protected]/message/74SXNGA5RIWM7QNX7H3G7SYIQLP4UUGV
- https://lists.fedoraproject.org/archives/list/[email protected]/message/NLRJB5JNKK3VVBLV3NH3RI7COEDAXSAB
Sources
- CVE-2022-45150 · CVE Program
- CVE-2022-45150 · NVD
- FIRST EPSS
- GHSA-6gx2-g773-hv9h · GitHub Advisory Database · CC BY 4.0
- CVE-2022-45150 · Red Hat security data · CC BY 4.0
This product uses the NVD API but is not endorsed or certified by the NVD. Sources and licences