CVE-2024-36255
📋 TL;DR
This vulnerability allows attackers to execute slash commands as other users by creating deceptive post actions in Mattermost. Attackers can trick users into interacting with malicious post actions that run unauthorized commands in arbitrary channels. Affected users include all users of vulnerable Mattermost instances who can view and interact with posts.
💻 Affected Systems
- Mattermost
📦 What is this software?
Mattermost Server by Mattermost
Mattermost Server by Mattermost
Mattermost Server by Mattermost
⚠️ Risk & Real-World Impact
Worst Case
An attacker could execute administrative slash commands as another user, potentially gaining unauthorized access to sensitive data, modifying system configurations, or disrupting team communications.
Likely Case
Attackers trick users into executing benign-looking slash commands that could leak information, send messages to unauthorized channels, or perform unwanted actions within the Mattermost instance.
If Mitigated
With proper user awareness training and limited slash command permissions, impact would be minimal to specific non-critical actions within the platform.
🎯 Exploit Status
Exploitation requires the attacker to have permission to create posts and the victim to interact with the malicious post action. No public exploit code is currently available.
🛠️ Fix & Mitigation
✅ Official Fix
Patch Version: 9.5.4, 9.6.2, 8.1.13
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. Stop the Mattermost service. 4. Replace the installation with the patched version. 5. Restart the Mattermost service. 6. Verify the version is updated.
🔧 Temporary Workarounds
Disable Interactive Post Actions
allTemporarily disable interactive post actions to prevent exploitation while patching
Edit config.json: set 'EnablePostActions' to false
Restart Mattermost service
🧯 If You Can't Patch
- Restrict slash command permissions to essential commands only
- Implement user awareness training about suspicious post interactions
🔍 How to Verify
Check if Vulnerable:
Check Mattermost version via System Console > About or run 'mattermost version' command
Check Version:
mattermost version
Verify Fix Applied:
Verify version is 9.5.4+, 9.6.2+, or 8.1.13+ and test that post actions properly validate user context
📡 Detection & Monitoring
Log Indicators:
- Unusual slash command executions from unexpected users
- Post action interactions resulting in commands in different channels
Network Indicators:
- Patterns of post creation followed by immediate command execution by different users
SIEM Query:
source='mattermost' AND (event='slash_command' OR event='post_action') | stats count by user, command, channel