CVE-2016-2157: Moodle cross-site request forgery (CSRF) vulnerability

moodle/moodle Updated 02 Oct 2025

Summary

13/05/2022
Yes i
High
8.8

CVE-2016-2157: Moodle cross-site request forgery (CSRF) vulnerability. Affects moodle/moodle across 4 version ranges.

< 2.7.13 >= 2.8.0, < 2.8.11 >= 2.9.0, < 2.9.5 >= 3.0.0, < 3.0.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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

Moodle is an open-source learning management system (LMS) used by educational institutions to create and manage online courses. It provides a platform for educators to deliver content, interact with students, and assess their progress. Moodle is widely adopted and offers a range of features, including assignment management. However, versions prior to 2.7.13, 2.8.11, 2.9.5, and 3.0.3 are vulnerable to a cross-site request forgery (CSRF) attack in the mod/assign/adminmanageplugins.php file. This vulnerability allows remote attackers to hijack the authentication of administrators and perform unauthorized actions related to managing Assignment plugins.

Vulnerability Detail

The CSRF vulnerability in Moodle allows attackers to exploit the trust between a user's browser and the Moodle application. By tricking an authenticated administrator into visiting a malicious website or clicking on a specially crafted link, an attacker can perform actions on behalf of the administrator without their knowledge or consent. This can lead to unauthorized changes in the Assignment plugins, potentially compromising the integrity and security of the Moodle instance. The vulnerability has a CVSS score of 8.8, indicating a high severity level.

How To Fix

Fixed versions by release line

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

  • < 2.7.13 2.7.13
    composer require moodle/moodle:2.7.13
  • >= 2.8.0, < 2.8.11 2.8.11
    composer require moodle/moodle:2.8.11
  • >= 2.9.0, < 2.9.5 2.9.5
    composer require moodle/moodle:2.9.5
  • >= 3.0.0, < 3.0.3 3.0.3
    composer require moodle/moodle:3.0.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 provided for this vulnerability. However, administrators can enhance their security posture by implementing additional measures such as enabling CSRF protection mechanisms, regularly monitoring and reviewing plugin configurations, and educating users about the risks of clicking on suspicious links or visiting untrusted websites.

Conclusion

The CSRF vulnerability in Moodle (CVE-2016-2157) poses a significant risk to the security and integrity of Moodle instances. It allows attackers to hijack the authentication of administrators and perform unauthorized actions related to managing Assignment plugins. To mitigate this vulnerability, it is crucial to upgrade to the latest version of Moodle and implement additional security measures. For further support on vulnerability remediation, please contact 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 attackers to perform unauthorized actions on behalf of an authenticated user by exploiting the trust between the user's browser and the application.

The CSRF vulnerability in Moodle can be exploited by tricking an authenticated administrator into visiting a malicious website or clicking on a specially crafted link.

The CSRF vulnerability in Moodle can lead to unauthorized changes in the Assignment plugins, compromising the integrity and security of the Moodle instance.

The CSRF vulnerability in Moodle can be mitigated by upgrading to the latest version of Moodle and implementing additional security measures such as enabling CSRF protection mechanisms and educating users about the risks.

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.

  • < 2.7.13 2.7.13
    composer require moodle/moodle:2.7.13
  • >= 2.8.0, < 2.8.11 2.8.11
    composer require moodle/moodle:2.8.11
  • >= 2.9.0, < 2.9.5 2.9.5
    composer require moodle/moodle:2.9.5
  • >= 3.0.0, < 3.0.3 3.0.3
    composer require moodle/moodle:3.0.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