CVE-2015-3272: Moodle open redirect vulnerability

moodle/moodle Updated 02 Oct 2025

Summary

13/05/2022
Yes i
High
7.4

CVE-2015-3272: Moodle open redirect vulnerability. Affects moodle/moodle across 3 version ranges.

>= 2.7.0, < 2.7.9 >= 2.8.0, < 2.8.7 >= 2.9.0, < 2.9.1

Fixed in 2.7.9, 2.8.7 or 2.9.1, 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 Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

Background

Moodle is an open-source learning management system (LMS) used by educational institutions worldwide. It provides a platform for creating and managing online courses, facilitating communication between teachers and students, and delivering educational content. Moodle is written in PHP and relies on a variety of libraries and modules to function effectively.

Vulnerability Detail

The clean_param function in lib/moodlelib.php in Moodle through 2.6.11, 2.7.x before 2.7.9, 2.8.x before 2.8.7, and 2.9.x before 2.9.1 is susceptible to an open redirect vulnerability. This vulnerability allows remote attackers to redirect users to arbitrary websites and conduct phishing attacks. The vulnerability arises from improper handling of the HTTP Referer header, which can be manipulated to include a substring matching a local URL. By exploiting this vulnerability, an attacker can trick users into visiting malicious websites, potentially leading to the disclosure of sensitive information or the installation of malware.

How To Fix

Fixed versions by release line

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

  • >= 2.7.0, < 2.7.9 2.7.9
    composer require moodle/moodle:2.7.9
  • >= 2.8.0, < 2.8.7 2.8.7
    composer require moodle/moodle:2.8.7
  • >= 2.9.0, < 2.9.1 2.9.1
    composer require moodle/moodle:2.9.1

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

Workaround

As a temporary workaround, administrators can modify the clean_param function in lib/moodlelib.php to implement stricter validation of the Referer header. This can be achieved by checking that the Referer header exactly matches the expected local URL or by disallowing any redirects based on the Referer header. However, this workaround should be considered temporary, and updating to the latest patched version of Moodle is the recommended long-term solution.

Conclusion

The open redirect vulnerability in Moodle can have serious consequences, including the compromise of user accounts and the disclosure of sensitive information. It is crucial for administrators to update their Moodle installations to the latest patched versions and review the security settings to mitigate the risk of similar vulnerabilities. Regularly monitoring security advisories and promptly applying updates is essential for maintaining a secure Moodle environment. 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 worldwide. It provides a platform for creating and managing online courses, facilitating communication between teachers and students, and delivering educational content.

An open redirect vulnerability occurs when a web application allows an attacker to redirect users to arbitrary websites. This can be exploited to conduct phishing attacks, where users are tricked into visiting malicious websites that appear legitimate.

The vulnerability in Moodle arises from improper handling of the HTTP Referer header. By manipulating the Referer header to include a substring matching a local URL, an attacker can trick users into visiting arbitrary websites. This can be used to conduct phishing attacks and potentially compromise user accounts or systems.

The open redirect vulnerability in Moodle can lead to various consequences, including the disclosure of sensitive information, the installation of malware or malicious scripts, and the compromise of user accounts. Attackers can use this vulnerability to conduct phishing attacks and trick users into revealing their credentials or other sensitive data.

To protect your Moodle installation, it is recommended to update to the latest patched version of Moodle (2.7.9, 2.8.7, or 2.9.1). Additionally, administrators should review and configure Moodle's security settings to minimize the risk of similar vulnerabilities. Regularly monitoring security advisories and applying updates promptly is crucial for maintaining a secure Moodle installation.

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.0, < 2.7.9 2.7.9
    composer require moodle/moodle:2.7.9
  • >= 2.8.0, < 2.8.7 2.8.7
    composer require moodle/moodle:2.8.7
  • >= 2.9.0, < 2.9.1 2.9.1
    composer require moodle/moodle:2.9.1

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