ADVISORIES

GitHub Advisory Database

GHSA-382v-gxj9-ffhc

Moodle uses predictable password-recovery tokens

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.

Affected packages

EcosystemPackageAffected versions
Packagistmoodle/moodle
All versions before 2.7.10 (fixed in 2.7.10)
Packagistmoodle/moodle
From 2.8.0 before 2.8.8 (fixed in 2.8.8)
Packagistmoodle/moodle
From 2.9.0 before 2.9.2 (fixed in 2.9.2)

References