Vulnerability · Published Jun 20, 2025 · Assigned by Mattermost

CVE-2025-4981Path Traversal Leading to RCE by Any Authenticated Mattermost User

Critical 9.9

In plain English

A critical-severity uncontrolled search path in Mattermost from Mattermost. There are no confirmed reports of exploitation so far. The chance it is exploited in the next 30 days is estimated at 1.0% (higher than 63% of all known vulnerabilities). Fixed versions are available - upgrade the affected package.

Severity (CVSS 3.1)9.9Critical
Exploit odds (30 days)1.0%top 36.5% of all CVEs
Exploited in the wildNo reportsCISA SSVC: none
Attack toolingNoneno public tooling known

Official description

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.

Affected packages & fixed versions

EcosystemPackageFixed inAdvisory
Gogithub.com/mattermost/mattermost-server0.0.0-20250519205859-65aec10162f6, 10.5.6+incompatible, 10.6.6+incompatible, 10.7.3+incompatible, 10.8.1+incompatible, 9.11.16+incompatibleGO-2025-3769
Gogithub.com/mattermost/mattermost-server0.0.0-20250519205859-65aec10162f6GHSA-qh58-9v3j-wcjc
Gogithub.com/mattermost/mattermost-server/v5no fix listedGO-2025-3769
Gogithub.com/mattermost/mattermost-server/v6no fix listedGO-2025-3769
Gogithub.com/mattermost/mattermost/server/v810.8.1GHSA-qh58-9v3j-wcjc
Gogithub.com/mattermost/mattermost/server/v810.7.3GHSA-qh58-9v3j-wcjc
Gogithub.com/mattermost/mattermost/server/v810.6.6GHSA-qh58-9v3j-wcjc
Gogithub.com/mattermost/mattermost/server/v88.0.0-20250519205859-65aec10162f6GO-2025-3769
Gogithub.com/mattermost/mattermost/server/v88.0.0-20250519205859-65aec10162f6GHSA-qh58-9v3j-wcjc
Gogithub.com/mattermost/mattermost/server/v810.5.6GHSA-qh58-9v3j-wcjc
Gogithub.com/mattermost/mattermost/server/v89.11.16GHSA-qh58-9v3j-wcjc

Affected products (as reported)

VendorProductVersions
Mattermost Mattermost 10.5.0 – through 10.5.59.11.0 – through 9.11.1510.8.0 – through 10.8.010.7.0 – through 10.7.210.6.0 – through 10.6.5

Weakness: CWE-427 · Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

References