CVE Catalog

CVE-2025-4981

CriticalCVSS 9.9
Published: Updated: Translated: NVD NIST

Summary

Mattermost versions 10.5.x <= 10.5.5, 9.11.x <= 9.11.15, 10.8.x <= 10.8.0, 10.7.x <= 10.7.2, 10.6.x <= 10.6.5 fail to sanitize filenames in the archive extractor. An authenticated user can write files to arbitrary filesystem locations by uploading archives with path traversal sequences in filenames, potentially leading to remote code execution. The vulnerability affects instances with FileSettings.EnableFileAttachments = true and FileSettings.ExtractContent = true, which are enabled by default.

Risk Assessment

An attacker with a valid account can write malicious files outside the intended directory, potentially leading to code execution on the server. Default-enabled required settings increase exposure for most installations.

Recommendation

Upgrade Mattermost to a version containing the fix (above the listed ranges). If upgrade is not possible, consider disabling FileSettings.ExtractContent or restricting archive uploads.

Other vulnerabilities in Mattermost

See all
Original NVD description (English source)

Mattermost versions 10.5.x <= 10.5.5, 9.11.x <= 9.11.15, 10.8.x <= 10.8.0, 10.7.x <= 10.7.2, 10.6.x <= 10.6.5 fail to sanitize filenames in the archive extractor which allows authenticated users to write files to arbitrary locations on the filesystem via uploading archives with path traversal sequences in filenames, potentially leading to remote code execution. The vulnerability impacts instances where file uploads and document search by content is enabled (FileSettings.EnableFileAttachments = true and FileSettings.ExtractContent = true). These configuration settings are enabled by default.

Vulnerability data from NVD (NIST) · CISA KEV · EPSS