CVE-2024-2450

8.8 HIGH

📋 TL;DR

This vulnerability allows authenticated attackers to take over other user accounts in Mattermost by exploiting a flaw in authentication switching from email to SAML. Attackers can craft malicious switch requests to hijack accounts under specific conditions. Organizations running affected Mattermost versions are at risk.

💻 Affected Systems

Products:
  • Mattermost
Versions: 8.1.x before 8.1.10, 9.2.x before 9.2.6, 9.3.x before 9.3.2, 9.4.x before 9.4.3
Operating Systems: All
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects instances with SAML authentication configured and when users switch from email to SAML authentication.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

Complete account takeover of any user, including administrators, leading to data theft, privilege escalation, and potential lateral movement within the organization.

🟠

Likely Case

Targeted account takeover of specific users, potentially leading to unauthorized access to sensitive communications, data exfiltration, and impersonation attacks.

🟢

If Mitigated

Limited impact if strong authentication controls, monitoring, and least privilege principles are already implemented, though risk remains until patched.

🌐 Internet-Facing: HIGH
🏢 Internal Only: HIGH

🎯 Exploit Status

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

Requires authenticated access and specific conditions where users switch authentication methods. Attackers need to craft malicious switch requests.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: 8.1.10, 9.2.6, 9.3.2, 9.4.3

Vendor Advisory: https://mattermost.com/security-updates

Restart Required: Yes

Instructions:

1. Backup your Mattermost instance. 2. Download the patched version from Mattermost releases. 3. Follow Mattermost upgrade documentation for your deployment method (Docker, binary, etc.). 4. Restart the Mattermost service. 5. Verify the upgrade was successful.

🔧 Temporary Workarounds

Disable SAML Authentication

all

Temporarily disable SAML authentication to prevent exploitation of the vulnerability.

Edit config.json: set 'EnableSaml' to false
Restart Mattermost service

Restrict Authentication Switching

all

Disable ability for users to switch between authentication methods via configuration.

Edit config.json: set 'EnableSignUpWithEmail' and related auth switching options appropriately
Restart Mattermost service

🧯 If You Can't Patch

  • Implement strict access controls and monitor for suspicious authentication switching activity.
  • Enable detailed logging for authentication events and review logs regularly for anomalous switch requests.

🔍 How to Verify

Check if Vulnerable:

Check Mattermost version via web interface (Main Menu > About Mattermost) or command line: 'mattermost version'

Check Version:

mattermost version

Verify Fix Applied:

Verify version is 8.1.10, 9.2.6, 9.3.2, 9.4.3 or higher. Test authentication switching functionality.

📡 Detection & Monitoring

Log Indicators:

  • Unusual authentication method switching events
  • Multiple failed authentication attempts followed by successful switch
  • User accounts accessing from unexpected locations after auth switch

Network Indicators:

  • Unusual patterns in authentication API requests
  • Spike in /api/v4/users/switch_method requests

SIEM Query:

source="mattermost" AND (event="authentication_switch" OR message="*switch*authentication*")

🔗 References

📤 Share & Export