CVE-2024-27295

8.2 HIGH

📋 TL;DR

This vulnerability in Directus allows attackers to hijack password reset emails by using email addresses with accented characters that MySQL/MariaDB treat as identical to the victim's email address. Attackers can reset victims' passwords and gain unauthorized access. All Directus instances using default MySQL/MariaDB configurations are affected.

💻 Affected Systems

Products:
  • Directus
Versions: All versions before 10.8.3
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Requires MySQL or MariaDB with default accent-insensitive collation settings.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Attackers gain administrative access to the Directus dashboard, potentially compromising all database content and system integrity.

🟠

Likely Case

Attackers reset passwords for regular users, gaining unauthorized access to sensitive data and functionality.

🟢

If Mitigated

With proper email verification and monitoring, unauthorized access attempts are detected and blocked before successful exploitation.

🌐 Internet-Facing: HIGH
🏢 Internal Only: MEDIUM

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: LIKELY
Unauthenticated Exploit: ⚠️ Yes
Complexity: LOW

Exploitation requires only knowledge of victim email addresses and ability to register similar email addresses with accented characters.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 10.8.3

Vendor Advisory: https://github.com/directus/directus/security/advisories/GHSA-qw9g-7549-7wg5

Restart Required: Yes

Instructions:

1. Backup your Directus instance and database. 2. Update Directus to version 10.8.3 or later. 3. Restart the Directus service. 4. Verify the update was successful.

🔧 Temporary Workarounds

Change Database Collation

all

Modify MySQL/MariaDB collation to accent-sensitive for email columns

ALTER TABLE directus_users MODIFY email VARCHAR(255) COLLATE utf8mb4_bin;

Disable Password Reset

all

Temporarily disable password reset functionality until patched

Modify Directus configuration to remove password reset endpoints

🧯 If You Can't Patch

  • Implement additional email verification steps before allowing password resets
  • Monitor logs for unusual password reset attempts from similar email addresses

🔍 How to Verify

Check if Vulnerable:

Check Directus version and database collation settings for email columns

Check Version:

directus version

Verify Fix Applied:

Verify Directus version is 10.8.3 or later and test password reset functionality

📡 Detection & Monitoring

Log Indicators:

  • Multiple failed password reset attempts
  • Password reset requests from email addresses with accented characters

Network Indicators:

  • Unusual patterns of password reset API calls

SIEM Query:

source="directus" AND (event="password_reset_request" OR event="password_reset_success")

🔗 References

📤 Share & Export