CVE-2022-45149: CSRF

Published Nov 15, 2022
·
Updated

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.

Other sources

MSA-22-0029: Course restore - CSRF token passed in course redirect URL

A user's CSRF token (Moodle sesskey) was unnecessarily included in the URL when being redirected to a course they have just restored.

Versions affected: 4.0 to 4.0.4, 3.11 to 3.11.10, 3.9 to 3.9.17 and earlier unsupported versions Versions fixed: 4.0.5, 3.11.11 and 3.9.18

Red Hat

Affected Software

9 affected componentsFixes available
redhat/moodle<4.0.5
4.0.5
redhat/moodle<3.11.11
3.11.11
redhat/moodle<3.9.18
3.9.18
Moodle moodle>=3.9.0<3.9.18
Moodle moodle>=3.11.0<3.11.11
Moodle moodle>=4.0.0<4.0.5
Fedoraproject Fedora=35
Fedoraproject Fedora=36
Fedoraproject Fedora=37

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/moodle to a version that resolves this vulnerability.

    Fixed in 4.0.5
  2. Upgrade

    Upgrade redhat/moodle to a version that resolves this vulnerability.

    Fixed in 3.11.11
  3. Upgrade

    Upgrade redhat/moodle to a version that resolves this vulnerability.

    Fixed in 3.9.18
  4. Upgrade

    Upgrade Moodle to a version that resolves this vulnerability.

    Fixed in 4.0.5
  5. Upgrade

    Upgrade Moodle to a version that resolves this vulnerability.

    Fixed in 3.11.11
  6. Upgrade

    Upgrade Moodle to a version that resolves this vulnerability.

    Fixed in 3.9.18
  7. Compensating control

    Until upgraded, ensure course redirect URLs do not include the Moodle sesskey/CSRF token in query parameters or the URL; rely on server-side session validation instead of passing sesskey via the redirect URL.

Event History

Nov 23, 2022
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
DescriptionWeakness
Data Sourced
via NVD·03:15 PM
DescriptionSeverityWeaknessAffected Software
Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is the vulnerability ID for this Moodle vulnerability?

The vulnerability ID for this Moodle vulnerability is CVE-2022-45149.

2

What is the severity of CVE-2022-45149?

The severity of CVE-2022-45149 is medium with a CVSS score of 5.4.

3

How does the vulnerability in Moodle occur?

The vulnerability in Moodle occurs due to insufficient validation of the HTTP request origin in course redirect URL.

4

Which versions of Moodle are affected by CVE-2022-45149?

Versions 3.9.0 to 3.9.18, 3.11.0 to 3.11.11, and 4.0.0 to 4.0.5 of Moodle are affected by CVE-2022-45149.

5

How can I fix the vulnerability in Moodle?

To fix the vulnerability in Moodle, update to version 3.9.18, 3.11.11, or 4.0.5, which contain the necessary patches.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203