CVE-2025-31676

8.8 HIGH

📋 TL;DR

A weak authentication vulnerability in Drupal's Email TFA module allows attackers to brute force two-factor authentication codes. This affects Drupal sites using Email TFA module versions before 2.0.3, potentially compromising user accounts with weak or predictable TFA codes.

💻 Affected Systems

Products:
  • Drupal Email TFA module
Versions: 0.0.0 through 2.0.2
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects Drupal sites with Email TFA module enabled and configured.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers bypass two-factor authentication entirely, gaining unauthorized access to administrative accounts and compromising the entire Drupal site.

🟠

Likely Case

Attackers brute force weak TFA codes to gain access to user accounts, potentially escalating privileges or accessing sensitive data.

🟢

If Mitigated

With rate limiting and strong TFA code policies, attackers would need significantly more time and resources to succeed, reducing successful compromise likelihood.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

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

Requires knowledge of valid usernames and ability to send authentication requests.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 2.0.3

Vendor Advisory: https://www.drupal.org/sa-contrib-2025-001

Restart Required: No

Instructions:

1. Update Drupal Email TFA module to version 2.0.3 or later. 2. Run database updates if required. 3. Clear Drupal caches.

🔧 Temporary Workarounds

Implement rate limiting

all

Configure web server or Drupal to limit authentication attempts per IP/user

Disable Email TFA module

Drupal

Temporarily disable the vulnerable module until patched

drush pm-disable email_tfa

🧯 If You Can't Patch

  • Implement strict rate limiting on authentication endpoints
  • Monitor authentication logs for brute force patterns and block suspicious IPs

🔍 How to Verify

Check if Vulnerable:

Check Email TFA module version in Drupal admin interface or via drush: drush pm-list | grep email_tfa

Check Version:

drush pm-list --fields=name,version | grep email_tfa

Verify Fix Applied:

Confirm Email TFA module version is 2.0.3 or higher

📡 Detection & Monitoring

Log Indicators:

  • Multiple failed TFA authentication attempts from single IP/user
  • Unusual authentication patterns outside business hours

Network Indicators:

  • High volume of POST requests to TFA endpoints
  • Traffic spikes to /user/login/tfa paths

SIEM Query:

source="drupal_access.log" AND (uri_path="/user/login/tfa" OR uri_path="/tfa") AND status="403" | stats count by src_ip

🔗 References

📤 Share & Export