CVE-2024-38277

5.4 MEDIUM

📋 TL;DR

This vulnerability allows an attacker to use a QR login key interchangeably with an auto-login key, potentially bypassing authentication mechanisms. It affects systems using the vulnerable authentication implementation, particularly Moodle installations with QR login enabled.

💻 Affected Systems

Products:
  • Moodle
Versions: Specific versions not detailed in references; check Moodle security advisories for exact affected versions.
Operating Systems: All platforms running vulnerable Moodle versions
Default Config Vulnerable: ✅ No
Notes: Requires QR login feature to be enabled and used; not all Moodle installations may be affected depending on configuration.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

An attacker could gain unauthorized access to user accounts by reusing QR login keys for auto-login, leading to account takeover and potential data exposure.

🟠

Likely Case

Limited account compromise for users who have generated QR login keys, allowing attackers to bypass normal authentication flows.

🟢

If Mitigated

With proper key separation, authentication remains secure and keys cannot be reused across different authentication methods.

🌐 Internet-Facing: MEDIUM - Requires user interaction (QR code generation) and knowledge of specific keys, but affects internet-facing authentication systems.
🏢 Internal Only: LOW - Primarily affects external authentication mechanisms; internal systems typically use different authentication methods.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires obtaining a user's QR login key and understanding the authentication flow; not trivial but feasible for determined attackers.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Check Moodle security releases; typically fixed in security updates following CVE publication.

Vendor Advisory: https://moodle.org/mod/forum/discuss.php?d=459502

Restart Required: No

Instructions:

1. Update Moodle to the latest security release. 2. Verify the update includes the fix for CVE-2024-38277. 3. Test QR login functionality to ensure proper key separation.

🔧 Temporary Workarounds

Disable QR Login

all

Temporarily disable QR login feature until patched to prevent exploitation.

Navigate to Moodle admin panel > Site administration > Plugins > Authentication > Manage authentication > Disable QR login

🧯 If You Can't Patch

  • Monitor authentication logs for unusual QR login or auto-login attempts
  • Implement additional authentication factors for sensitive accounts

🔍 How to Verify

Check if Vulnerable:

Check if QR login keys can be used for auto-login by testing with generated keys; review Moodle version against security advisories.

Check Version:

Check Moodle version via admin panel or by examining version.php file in Moodle root directory.

Verify Fix Applied:

After patching, test that QR login keys are unique and cannot be reused for auto-login; verify version is updated.

📡 Detection & Monitoring

Log Indicators:

  • Multiple authentication attempts using the same key for different methods
  • Unusual auto-login events from QR login sources

Network Indicators:

  • Repeated authentication requests with similar key patterns

SIEM Query:

Example: auth_method IN ('qr_login', 'auto_login') AND same_key_used_count > 1

🔗 References

📤 Share & Export