CVE-2025-4981
JSON

9.9critical

Path Traversal Leading to RCE by Any Authenticated Mattermost User

Severity
9.9critical CVSS:3.1 by Mattermost
Exploit likelihood
1.06% (higher than 65% of CVEs; EPSS, by FIRST)
Published
Last changed
Assigned by
Mattermost
Also known as
GHSA-qh58-9v3j-wcjcGO-2025-3769

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

Product or packageVersionsReported by
Mattermost Mattermostfrom 10.5.0 up to 10.5.5, from 9.11.0 up to 9.11.15, from 10.8.0 up to 10.8.0, from 10.7.0 up to 10.7.2, from 10.6.0 up to 10.6.5
Not affected: 10.9.0, 10.5.6, 9.11.16, 10.8.1, 10.7.3, 10.6.6
CVE List
github.com/mattermost/mattermost-server (Go)before 0.0.0-20250519205859-65aec10162f6, from 9.11.0+incompatible before 9.11.16+incompatible, from 10.5.0+incompatible before 10.5.6+incompatible, from 10.6.0+incompatible before 10.6.6+incompatible, from 10.7.0+incompatible before 10.7.3+incompatible, from 10.8.0+incompatible before 10.8.1+incompatibleGitHub Advisory Database, Go Vulnerability Database
github.com/mattermost/mattermost/server/v8 (Go)before 8.0.0-20250519205859-65aec10162f6, from 10.5.0 before 10.5.6, from 9.11.0 before 9.11.16, from 10.8.0 before 10.8.1, from 10.7.0 before 10.7.3, from 10.6.0 before 10.6.6GitHub Advisory Database, Go Vulnerability Database
github.com/mattermost/mattermost-server/v5 (Go)all versionsGo Vulnerability Database
github.com/mattermost/mattermost-server/v6 (Go)all versionsGo Vulnerability Database
mattermost mattermost_serverfrom 9.11.0 before 9.11.16, from 10.5.0 before 10.5.6, from 10.6.0 before 10.6.6, from 10.7.0 before 10.7.3, 10.8.0NVD

All scores

Mattermost9.9critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
GitHub9.9critical CVSS:3.1CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Classification

CWE-427

SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.

What each source says

CVE List

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.

Go Vulnerability Database

Mattermost allows authenticated users to write files to arbitrary locations in github.com/mattermost/mattermost-server

NVD (es)

Las versiones de Mattermost 10.5.x &lt;= 10.5.5, 9.11.x &lt;= 9.11.15, 10.8.x &lt;= 10.8.0, 10.7.x &lt;= 10.7.2 y 10.6.x &lt;= 10.6.5 no depuran los nombres de archivo en el extractor de archivos, lo que permite a los usuarios autenticados escribir archivos en ubicaciones arbitrarias del sistema de archivos mediante la carga de archivos con secuencias de path traversal en los nombres de archivo, lo que podría provocar la ejecución remota de código. Esta vulnerabilidad afecta a las instancias donde la carga de archivos y la búsqueda de documentos por contenido están habilitadas (FileSettings.EnableFileAttachments = true y FileSettings.ExtractContent = true). Estas opciones de configuración están habilitadas por defecto.

References

Sources

SourceRecordLicence
CVE ListCVE-2025-4981 changed 2025-06-20CVE Terms of Use
GitHub Advisory DatabaseGHSA-qh58-9v3j-wcjc changed 2025-07-28CC-BY-4.0
Go Vulnerability DatabaseGO-2025-3769 changed 2026-03-03CC-BY-4.0
NVDCVE-2025-4981 changed 2026-06-17Public domain