Cross-site request forgery in Moodle
Key facts
- Attack vector
- Network
- Privileges required
- None
- User interaction
- Required
- Attack complexity
- Low
- Impact type
- Tampering
- 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-352.
Summary
A vulnerability was found in Moodle which exists due to insufficient validation of the HTTP request origin in course redirect URL. A user's CSRF token was unnecessarily included in the URL when being redirected to a course they have just restored. A remote attacker can trick the victim to visit a specially crafted web page and perform arbitrary actions on behalf of the victim on the vulnerable website. This flaw allows an attacker to perform cross-site request forgery attacks.
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.0 to before 3.9.18 | 3.9.18 | Patch available | GHSA-8v23-w4w5-w83c |
| — | moodle/moodle (Packagist) | 3.11.0 to before 3.11.11 | 3.11.11 | Patch available | GHSA-8v23-w4w5-w83c |
| — | moodle/moodle (Packagist) | 4.0.0 to before 4.0.5 | 4.0.5 | Patch available | GHSA-8v23-w4w5-w83c |
- 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.0 to before 3.9.18 Fixed in 3.9.18 Patch available GHSA-8v23-w4w5-w83c
- moodle/moodle (Packagist) Vendor— Affected 3.11.0 to before 3.11.11 Fixed in 3.11.11 Patch available GHSA-8v23-w4w5-w83c
- moodle/moodle (Packagist) Vendor— Affected 4.0.0 to before 4.0.5 Fixed in 4.0.5 Patch available GHSA-8v23-w4w5-w83c
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-8v23-w4w5-w83c moodle/moodle (Packagist) Fixed in 3.9.18 Advisory →
- Fix · GHSA-8v23-w4w5-w83c moodle/moodle (Packagist) Fixed in 3.11.11 Advisory →
- Fix · GHSA-8v23-w4w5-w83c moodle/moodle (Packagist) Fixed in 4.0.5 Advisory →
Vendor assessments
Timeline
- 2026-10-02 Threatist record created from CVE-2022-45149
- 2026-10-03 Alias added: GHSA-8v23-w4w5-w83c
References
Advisory 4
Other 6
- https://bugzilla.redhat.com/show_bug.cgi?id=2142772
- https://moodle.org/mod/forum/discuss.php?d=440769
- http://git.moodle.org/gw?p=moodle.git&a=search&h=HEAD&st=commit&s=MDL-75862
- 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-45149 · CVE Program
- CVE-2022-45149 · NVD
- FIRST EPSS
- GHSA-8v23-w4w5-w83c · GitHub Advisory Database · CC BY 4.0
- CVE-2022-45149 · 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