CVE-2025-49222

6.8 MEDIUM

📋 TL;DR

This vulnerability allows system administrators in Mattermost to upload non-attachment file types via shared channels, potentially placing files in arbitrary filesystem directories. It affects Mattermost versions 10.8.x up to 10.8.3, 10.5.x up to 10.5.8, 9.11.x up to 9.11.17, 10.9.x up to 10.9.2, and 10.10.x up to 10.10.0. The issue stems from improper validation of upload types in remote cluster upload sessions.

💻 Affected Systems

Products:
  • Mattermost
Versions: 10.8.x <= 10.8.3, 10.5.x <= 10.5.8, 9.11.x <= 9.11.17, 10.9.x <= 10.9.2, 10.10.x <= 10.10.0
Operating Systems: All platforms running Mattermost
Default Config Vulnerable: ⚠️ Yes
Notes: Requires system admin privileges and shared channels feature enabled. Remote cluster upload sessions must be used.

📦 What is this software?

⚠️ Risk & Real-World Impact

🔴

Worst Case

A compromised or malicious system admin could upload executable files to sensitive directories, potentially leading to remote code execution, data exfiltration, or complete system compromise.

🟠

Likely Case

System admins could upload configuration files or scripts to modify system behavior, disrupt services, or gain persistent access to the server.

🟢

If Mitigated

With proper access controls and monitoring, impact would be limited to file system manipulation within the Mattermost application directory, with no privilege escalation beyond admin capabilities.

🌐 Internet-Facing: MEDIUM
🏢 Internal Only: HIGH

🎯 Exploit Status

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

Exploitation requires system admin access and knowledge of shared channels functionality. No public exploit code is available.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Update to Mattermost versions 10.8.4, 10.5.9, 9.11.18, 10.9.3, or 10.10.1

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

Restart Required: No

Instructions:

1. Backup your Mattermost configuration and database. 2. Download the patched version from Mattermost downloads page. 3. Stop the Mattermost service. 4. Replace the Mattermost binary with the patched version. 5. Start the Mattermost service. 6. Verify the version is updated.

🔧 Temporary Workarounds

Disable Shared Channels

all

Temporarily disable shared channels feature to prevent exploitation via remote cluster upload sessions

Set 'EnableSharedChannels' to 'false' in config.json

Restrict System Admin Access

all

Review and reduce the number of system administrators to only essential personnel

🧯 If You Can't Patch

  • Implement strict file upload monitoring and alerting for non-attachment file types
  • Apply filesystem permissions to restrict Mattermost's write access to only necessary directories

🔍 How to Verify

Check if Vulnerable:

Check Mattermost version via System Console > About or run 'mattermost version' command. Compare against affected versions list.

Check Version:

mattermost version

Verify Fix Applied:

Verify version is 10.8.4, 10.5.9, 9.11.18, 10.9.3, or 10.10.1 or higher. Test upload functionality with non-attachment files in shared channels.

📡 Detection & Monitoring

Log Indicators:

  • Unusual file upload activity in shared channels
  • Non-attachment file types being uploaded via remote cluster sessions
  • System admin uploading files to unexpected directories

Network Indicators:

  • Increased upload traffic from admin accounts in shared channels
  • Unusual file transfer patterns in Mattermost cluster communications

SIEM Query:

source="mattermost" AND (event="file_upload" AND file_type NOT IN ("image","document","audio","video")) AND channel_type="shared"

🔗 References

📤 Share & Export