Cross-Site Request Forgery in Moodle
Impact
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.
Source excerpt · OSVAffected packages
Start with the recorded fix for your release branch. Check your installed version and test compatibility before upgrading. Fixing this advisory does not rule out other vulnerabilities in the release.
| Affected range | Recorded fix |
|---|---|
| From 3.9.0 before 3.9.18Ecosystem versions | 3.9.18 |
| From 3.11.0 before 3.11.11Ecosystem versions | 3.11.11 |
| From 4.0.0 before 4.0.5Ecosystem versions | 4.0.5 |
Version evidence: OSV · GHSA-8v23-w4w5-w83c
View original version evidence (34 explicit versions)
Original source description
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.
References
- Security advisory nvd.nist.gov/vuln/detail/CVE-2022-45149
- Source reference bugzilla.redhat.com/show_bug.cgi
- Source reference lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/2DHYIIAUXUBHMBEDYU7TYNZXEN2W2SA2
- Source reference lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/74SXNGA5RIWM7QNX7H3G7SYIQLP4UUGV
- Source reference lists.fedoraproject.org/archives/list/package-announce@lists.fedoraproject.org/message/NLRJB5JNKK3VVBLV3NH3RI7COEDAXSAB
- Source reference moodle.org/mod/forum/discuss.php
- Source reference git.moodle.org/gw