VDB
Sign up
HIGH7.5

GHSA-382v-gxj9-ffhc

Moodle uses predictable password-recovery tokens

Quick fix

GHSA-382v-gxj9-ffhc — moodle/moodle: upgrade to the fixed version with the command below.

composer require moodle/moodle:^2.7.10

Details

lib/moodlelib.php in Moodle through 2.6.11, 2.7.x before 2.7.10, 2.8.x before 2.8.8, and 2.9.x before 2.9.2 relies on the PHP mt_rand function to implement the random_string and complex_random_string functions, which makes it easier for remote attackers to predict password-recovery tokens via a brute-force approach.

Are you affected?

Enter the version of the package you're using.

Affected packages

Packagist/moodle/moodle
Introduced in: 0Fixed in: 2.7.10
Fixcomposer require moodle/moodle:^2.7.10
Packagist/moodle/moodle
Introduced in: 2.8.0Fixed in: 2.8.8
Fixcomposer require moodle/moodle:^2.8.8
Packagist/moodle/moodle
Introduced in: 2.9.0Fixed in: 2.9.2
Fixcomposer require moodle/moodle:^2.9.2

References