Description

One severe weakness has been found in the Mattermost platform, referenced as CVE-2025-4981 and with a CVSS rating of 9.9. The bug is in the Mattermost archive extraction feature, permitting users with authentication to take advantage of a path traversal vulnerability. By uploading crafted archive files (such as .zip or .tar.gz) with bad file paths, an attacker can write files outside the desired directory. When default settings EnableFileAttachments and ExtractContent are turned on, the vulnerability can be used to execute remote code (RCE), essentially breaching the entire system. Mattermost is an open-source collaboration platform with broad adoption, many times deployed by organizations who need strict control over data privacy like government institutions, healthcare providers, and banking institutions. Due to its self-hosted capability and deep integrations into corporate systems, any exploit against Mattermost is high risk. The issue exists in multiple versions such as 10.5.x through 10.5.5, 10.6.x through 10.6.5, 10.7.x through 10.7.2, 10.8.0, and 9.11.x through 9.11.15. The archive extractor contains a failure to validate input, enabling attackers with proper credentials to drop malicious files throughout the host system's filesystem, possibly running unauthorized commands and gaining elevated privileges. In order to avoid the risk, patches have been released by Mattermost that fix the archive extraction logic. Upgrades to the latest supported versions should be done immediately, strongly recommended by administrators. Monitoring user uploads, disabling features of unnecessary archive extraction, and inspecting and hardening file handling settings can also help in limiting exposure to such attacks. Security teams must make this a high-priority update for all Mattermost installations.