CVE-2024-45691 Moodle: lesson activity password bypass through php loose comparison

Medium 5.4 Published Updated

Attackers can bypass password restrictions on Moodle lesson activities if the password is a magic hash value due to loose comparison logic.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-45691?

CVE-2024-45691 is a medium-severity authentication bypass vulnerability in Moodle Moodle, published on 20 Nov 2024. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

A flaw was found in Moodle. When restricting access to a lesson activity with a password, certain passwords could be bypassed or less secure due to a loose comparison in the password-checking logic. This issue only affected passwords set to "magic hash" values.

Which versions are affected by CVE-2024-45691?

9 open source packages ship an affected version, including moodle/moodle and moodle. It affects 1 product.

PackageAffectedFixed in
moodle/moodle PackagistAll versions4.1.13
moodle/moodle PackagistAll versions4.1.13
moodle/moodle PackagistFrom 4.2.0-beta4.2.10
moodle/moodle PackagistFrom 4.2.0-beta4.2.10
moodle/moodle PackagistFrom 4.3.0-beta4.3.7
moodle/moodle PackagistFrom 4.3.0-beta4.3.7
3 more packages
moodle/moodle PackagistFrom 4.4.0-beta4.4.3
moodle/moodle PackagistFrom 4.4.0-beta4.4.3
moodle BitnamiAll versions4.1.13, 4.2.10, 4.3.7, 4.4.3

Products include Moodle Moodle.

How do I fix CVE-2024-45691?

Upgrade moodle/moodle to a fixed version for your release line: 4.1.13, 4.2.10, 4.3.7 or 4.4.3.

Upgrade, and rotate credentials and sessions that may have been exposed. More about Authentication bypass.

Is CVE-2024-45691 being exploited?

There is no known exploitation of CVE-2024-45691 in the wild and no public exploit code.

All Moodle Moodle vulnerabilities

Sources

Also known as BIT-moodle-2024-45691, GHSA-xfv7-h2qg-rjm7, UBUNTU-CVE-2024-45691.

Is CVE-2024-45691 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free