CVE-2020-5240

7.6 HIGH

📋 TL;DR

This vulnerability in wagtail-2fa allows any CMS user to view and delete other users' 2FA devices without special permissions. By deleting another user's 2FA device, an attacker could disable their two-factor authentication and potentially compromise their account if they obtain the password. This affects all wagtail-2fa users with CMS access.

💻 Affected Systems

Products:
  • wagtail-2fa
Versions: All versions before 1.4.1
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Affects any wagtail CMS installation using wagtail-2fa for two-factor authentication.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Account takeover of administrative users leading to complete system compromise, data theft, or unauthorized content manipulation.

🟠

Likely Case

Targeted account compromise of specific users, potentially leading to unauthorized content changes or privilege escalation.

🟢

If Mitigated

Limited impact if strong password policies and monitoring are in place, but still represents an authentication bypass risk.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ✅ No
Complexity: LOW

Exploitation requires CMS user access but no special permissions. Attack path is straightforward via specific URL paths.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 1.4.1

Vendor Advisory: https://github.com/labd/wagtail-2fa/security/advisories/GHSA-9gjv-6qq6-v7qm

Restart Required: No

Instructions:

1. Update wagtail-2fa to version 1.4.1 or later using pip: pip install wagtail-2fa>=1.4.1
2. Verify the update completed successfully
3. Test 2FA functionality remains operational

🔧 Temporary Workarounds

Restrict CMS Access

all

Limit CMS user accounts to only trusted personnel who absolutely need access.

Implement Network Segmentation

all

Restrict access to wagtail admin interface to specific IP ranges or VPN users only.

🧯 If You Can't Patch

  • Implement strict access controls and monitor all CMS user activity for suspicious behavior
  • Enforce strong password policies and consider additional authentication layers

🔍 How to Verify

Check if Vulnerable:

Check wagtail-2fa version: pip show wagtail-2fa | grep Version

Check Version:

pip show wagtail-2fa | grep Version

Verify Fix Applied:

Confirm version is 1.4.1 or higher: pip show wagtail-2fa | grep Version

📡 Detection & Monitoring

Log Indicators:

  • Unusual 2FA device deletion events
  • Multiple failed 2FA attempts followed by successful login
  • CMS access from unexpected user accounts

Network Indicators:

  • HTTP requests to wagtail admin paths related to 2FA device management from unauthorized users

SIEM Query:

source="wagtail" AND (event="2fa_device_deleted" OR path="/admin/2fa/" AND method="DELETE")

🔗 References

📤 Share & Export