CVE-2014-7836: Moodle multiple cross-site request forgery (CSRF) vulnerabilities

moodle/moodle Updated 02 Oct 2025

Summary

13/05/2022
Yes i
Moderate
Not published

CVE-2014-7836: Moodle multiple cross-site request forgery (CSRF) vulnerabilities. Affects moodle/moodle across 3 version ranges.

< 2.5.9 >= 2.6.0, < 2.6.6 >= 2.7.0, < 2.7.3

Fixed in 2.5.9, 2.6.6 or 2.7.3, depending 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 a platform for educators to deliver content, interact with students, and assess their progress. The LTI module in Moodle allows integration with external tools and services. However, versions prior to 2.5.9, 2.6.6, and 2.7.3 are vulnerable to multiple cross-site request forgery (CSRF) attacks.

Vulnerability Detail

The identified vulnerabilities in Moodle's LTI module allow remote attackers to hijack the authentication of arbitrary users. By exploiting these vulnerabilities, an attacker can perform unauthorized actions on behalf of the targeted user. The vulnerabilities exist in the 'mod/lti/request_tool.php' and 'mod/lti/instructor_edit_tool_type.php' endpoints. These endpoints do not properly validate the authenticity of requests, making it possible for an attacker to forge requests and trick users into unknowingly performing malicious actions.

How To Fix

Fixed versions by release line

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

  • < 2.5.9 2.5.9
    composer require moodle/moodle:2.5.9
  • >= 2.6.0, < 2.6.6 2.6.6
    composer require moodle/moodle:2.6.6
  • >= 2.7.0, < 2.7.3 2.7.3
    composer require moodle/moodle:2.7.3

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

Workaround

If an immediate update is not possible, administrators can implement a workaround by applying custom code changes to the affected endpoints. The code changes should include proper request validation and verification mechanisms to prevent CSRF attacks. Here is an example of how the 'mod/lti/request_tool.php' endpoint can be secured:

// Add the following code at the beginning of the 'request_tool.php' file

// Verify the authenticity of the request
if ($_SERVER['REQUEST_METHOD'] !== 'POST' || empty($_POST['csrf_token']) || $_POST['csrf_token'] !== $_SESSION['csrf_token']) {
    // Invalid or missing CSRF token, reject the request
    header('HTTP/1.1 403 Forbidden');
    exit;
}

// Rest of the original code
// ...

Note: This is a simplified example and may require additional modifications based on the Moodle version and specific implementation.

Conclusion

The identified vulnerabilities in Moodle's LTI module pose a risk of unauthorized actions being performed on behalf of users. It is crucial for administrators to update Moodle to versions 2.5.9, 2.6.6, or 2.7.3, depending on the installed version, to mitigate the risk of CSRF attacks. Additionally, implementing proper request validation and verification mechanisms can provide an interim solution until the update is applied. 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. It provides a platform for educators to deliver content, interact with students, and assess their progress.

The LTI (Learning Tools Interoperability) module in Moodle allows integration with external tools and services. It enables educators to incorporate third-party applications and resources into their courses.

Cross-site request forgery (CSRF) vulnerabilities occur when an attacker tricks a user into unknowingly performing actions on a web application without their consent. In the context of Moodle, these vulnerabilities allow an attacker to hijack the authentication of users and perform unauthorized actions on their behalf.

To protect your Moodle installation from CSRF attacks, it is crucial to keep the software up to date with the latest security patches. Additionally, implementing proper request validation and verification mechanisms, such as checking CSRF tokens, can help mitigate the risk of CSRF attacks.

If an immediate update is not possible, administrators can apply custom code changes to the affected endpoints to add request validation and verification mechanisms. However, it is strongly recommended to update Moodle to the patched versions as soon as possible.

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.5.9 2.5.9
    composer require moodle/moodle:2.5.9
  • >= 2.6.0, < 2.6.6 2.6.6
    composer require moodle/moodle:2.6.6
  • >= 2.7.0, < 2.7.3 2.7.3
    composer require moodle/moodle:2.7.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