CVE-2016-7038: Moodle Weak Password Recovery Mechanism for Forgotten Password

moodle/moodle Updated 02 Oct 2025

Summary

13/05/2022
Yes i
High
7.3

CVE-2016-7038: Moodle Weak Password Recovery Mechanism for Forgotten Password. Affects moodle/moodle across 4 version ranges.

>= 2.7, < 2.7.16 >= 2.9, < 2.9.8 >= 3.0, < 3.0.6 >= 3.1, < 3.1.2

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 deliver online courses. It provides a wide range of features for course management, content creation, and student engagement. Moodle is written in PHP and relies on a database to store user information and course data. The vulnerability identified as CVE-2016-7038 affects Moodle versions 2.x and 3.x. It specifically relates to the weak password recovery mechanism for forgotten passwords.

Vulnerability Detail

The vulnerability arises from the fact that web service tokens in Moodle are not invalidated when a user changes their password or is forced to change it. This means that even after a password change, an attacker with access to a valid web service token can continue to access the user's account and perform unauthorized actions. This vulnerability poses a significant risk as it allows an attacker to bypass the password-based authentication system and gain unauthorized access to sensitive user data or perform malicious activities on behalf of the compromised user.

How To Fix

Fixed versions by release line

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

  • >= 2.7, < 2.7.16 2.7.16
    composer require moodle/moodle:2.7.16
  • >= 2.9, < 2.9.8 2.9.8
    composer require moodle/moodle:2.9.8
  • >= 3.0, < 3.0.6 3.0.6
    composer require moodle/moodle:3.0.6
  • >= 3.1, < 3.1.2 3.1.2
    composer require moodle/moodle:3.1.2

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, Moodle administrators can manually revoke web service tokens for users who have changed their passwords. This can be done by accessing the Moodle administration interface and navigating to the user management section. From there, administrators can locate the affected user and revoke their web service token. However, this workaround is not scalable for large deployments and should only be used as a temporary measure until a permanent fix is implemented.

Conclusion

The weak password recovery mechanism in Moodle poses a significant security risk as it allows an attacker to bypass the password-based authentication system. Moodle administrators should take immediate action to invalidate web service tokens when a user changes their password and prompt users to regenerate their tokens. Failure to address this vulnerability could result in unauthorized access to sensitive user data and potential misuse of user accounts. 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 used by educational institutions to create and deliver online courses.

The vulnerability affects Moodle versions 2.x and 3.x.

The vulnerability allows an attacker with a valid web service token to access a user's account and perform unauthorized actions.

Yes, a fix is available for this vulnerability. Moodle administrators should ensure that web service tokens are invalidated when a user changes their password.

Yes, this vulnerability can be exploited remotely if an attacker has access to a valid web service token.

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, < 2.7.16 2.7.16
    composer require moodle/moodle:2.7.16
  • >= 2.9, < 2.9.8 2.9.8
    composer require moodle/moodle:2.9.8
  • >= 3.0, < 3.0.6 3.0.6
    composer require moodle/moodle:3.0.6
  • >= 3.1, < 3.1.2 3.1.2
    composer require moodle/moodle:3.1.2

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