CVE-2018-16854: Moodle Login CSRF vulnerability in login form

moodle/moodle Updated 02 Oct 2025

Summary

13/05/2022
Yes i
High
8.8

CVE-2018-16854: Moodle Login CSRF vulnerability in login form. Affects moodle/moodle across 4 version ranges.

>= 3.1, < 3.1.15 >= 3.3, < 3.3.9 >= 3.4, < 3.4.6 >= 3.5, < 3.5.3

Fixed in 4 releases; the minimum fixed version depends on the release line you run. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

Moodle is an open-source learning management system (LMS) used by educational institutions to create and manage online courses. It provides various features for course administration, content creation, and student engagement. Moodle versions 3.5 to 3.5.2, 3.4 to 3.4.5, 3.3 to 3.3.8, 3.1 to 3.1.14, and earlier are affected by a Login CSRF vulnerability. This vulnerability allows an attacker to forge a malicious login request, potentially leading to unauthorized access to user accounts and sensitive information.

Vulnerability Detail

The login form in Moodle is vulnerable to cross-site request forgery (CSRF) attacks. The form does not include a token to protect against CSRF, making it possible for an attacker to trick a user into submitting a login request without their knowledge or consent. This can result in the attacker gaining unauthorized access to the user's account and performing actions on their behalf. The impact of this vulnerability is high, as it can lead to unauthorized access, data leakage, and potential compromise of the entire Moodle instance.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 3.1, < 3.1.15 3.1.15
    composer require moodle/moodle:3.1.15
  • >= 3.3, < 3.3.9 3.3.9
    composer require moodle/moodle:3.3.9
  • >= 3.4, < 3.4.6 3.4.6
    composer require moodle/moodle:3.4.6
  • >= 3.5, < 3.5.3 3.5.3
    composer require moodle/moodle:3.5.3

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Workaround

There is no specific workaround mentioned for this vulnerability. The recommended solution is to upgrade to the fixed versions of Moodle.

Conclusion

The Moodle Login CSRF vulnerability in the login form can lead to unauthorized access and potential compromise of user accounts and sensitive information. It is crucial to upgrade to the fixed versions of Moodle to mitigate this vulnerability. For further support on vulnerability remediation, you can reach out to DevNack.com.

See every vulnerability recorded for moodle/moodle →

Share this vulnerability

FAQ

Moodle is an open-source learning management system (LMS) used by educational institutions to create and manage online courses.

A CSRF vulnerability allows an attacker to forge malicious requests on behalf of a user, potentially leading to unauthorized actions or access.

The affected versions of Moodle include 3.5 to 3.5.2, 3.4 to 3.4.5, 3.3 to 3.3.8, 3.1 to 3.1.14, and earlier.

The impact of this vulnerability is high, as it can lead to unauthorized access, data leakage, and potential compromise of the entire Moodle instance.

To protect your Moodle instance, it is recommended to upgrade to the fixed versions of Moodle, which include 3.6, 3.5.3, 3.4.6, 3.3.9, and 3.1.15.

Related vulnerabilities

Recent vulnerabilities recorded for moodle/moodle.

How To Fix

Fixed versions by release line

The minimum fixed version depends on the release line you run.

  • >= 3.1, < 3.1.15 3.1.15
    composer require moodle/moodle:3.1.15
  • >= 3.3, < 3.3.9 3.3.9
    composer require moodle/moodle:3.3.9
  • >= 3.4, < 3.4.6 3.4.6
    composer require moodle/moodle:3.4.6
  • >= 3.5, < 3.5.3 3.5.3
    composer require moodle/moodle:3.5.3

Tip — Not sure which release line you're on? Vulert can find the fix for the version you are using. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback