CVE-2024-36255

5.7 MEDIUM

📋 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

Products:
  • Mattermost
Versions: 9.5.x <= 9.5.3, 9.6.x <= 9.6.1, 8.1.x <= 8.1.12
Operating Systems: All platforms running Mattermost
Default Config Vulnerable: ⚠️ Yes
Notes: All Mattermost deployments with the affected versions are vulnerable regardless of configuration.

📦 What is this software?

⚠️ 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.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: HIGH

🎯 Exploit Status

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

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

all

Temporarily 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

🔗 References

📤 Share & Export