CVE-2025-31947
📋 TL;DR
Mattermost fails to implement account lockout for LDAP users after repeated failed login attempts, allowing attackers to perform denial-of-service attacks by locking legitimate LDAP accounts. This affects Mattermost instances configured with LDAP authentication in vulnerable versions.
💻 Affected Systems
- Mattermost
📦 What is this software?
Mattermost Server by Mattermost
Mattermost Server by Mattermost
Mattermost Server by Mattermost
Mattermost Server by Mattermost
⚠️ Risk & Real-World Impact
Worst Case
Attackers could lock all LDAP user accounts, causing complete service disruption for LDAP-authenticated users until administrators manually unlock accounts or reconfigure authentication.
Likely Case
Targeted account lockouts against specific users (e.g., administrators, key personnel) causing temporary access denial and operational disruption.
If Mitigated
Limited impact with monitoring and rapid response to unlock accounts; no data breach or privilege escalation occurs.
🎯 Exploit Status
Exploitation requires no authentication and can be performed with simple scripts; LDAP account names must be known or guessed.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 10.6.2, 10.5.3, 10.4.5, 9.11.12
Vendor Advisory: https://mattermost.com/security-updates
Restart Required: Yes
Instructions:
1. Backup Mattermost configuration and database. 2. Download patched version from mattermost.com/download. 3. Stop Mattermost service. 4. Replace binary/files with patched version. 5. Restart Mattermost service. 6. Verify version and functionality.
🔧 Temporary Workarounds
Temporary LDAP Account Lockout Configuration
allConfigure LDAP server to enforce account lockout policies independently of Mattermost
Rate Limiting at Network Level
allImplement network-level rate limiting for Mattermost login endpoints
🧯 If You Can't Patch
- Monitor LDAP account lockout events and implement alerting for unusual patterns
- Consider temporarily disabling LDAP authentication or switching to alternative authentication methods
🔍 How to Verify
Check if Vulnerable:
Check Mattermost version and verify LDAP authentication is enabled in System Console > Authentication > LDAP
Check Version:
mattermost version
Verify Fix Applied:
After patching, test LDAP login failures to confirm account lockout now functions properly
📡 Detection & Monitoring
Log Indicators:
- Multiple failed LDAP login attempts for same user in short timeframe
- LDAP account lockout events in LDAP server logs
Network Indicators:
- High volume of POST requests to /api/v4/users/login endpoint from single IP
SIEM Query:
source="mattermost" "login attempt failed" user=* count by user, src_ip | where count > 5