{"id":"CVE-2025-4981","aliases":["CVE-2025-4981","GHSA-qh58-9v3j-wcjc","GO-2025-3769"],"related":[],"kind":"vulnerability","state":"published","title":"Path Traversal Leading to RCE by Any Authenticated Mattermost User","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 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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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.","source":"cvelist"},{"lang":"en","text":"Mattermost allows authenticated users to write files to arbitrary locations in github.com/mattermost/mattermost-server","format":"markdown","source":"go"},{"lang":"es","text":"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.","source":"nvd"}],"published":"2025-06-20T10:27:13.471Z","modified":"2026-06-17T09:34:26.060Z","severity":{"scorer":"Mattermost","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":9.9,"rating":"CRITICAL"},"severities":[{"scorer":"Mattermost","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":9.9,"rating":"CRITICAL"},{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","score":9.9,"rating":"CRITICAL"}],"cwes":["CWE-427"],"affected":[{"ranges":[{"type":"semver","introduced":"10.5.0","lastAffected":"10.5.5","status":"affected"},{"type":"semver","introduced":"9.11.0","lastAffected":"9.11.15","status":"affected"},{"type":"semver","introduced":"10.8.0","lastAffected":"10.8.0","status":"affected"},{"type":"semver","introduced":"10.7.0","lastAffected":"10.7.2","status":"affected"},{"type":"semver","introduced":"10.6.0","lastAffected":"10.6.5","status":"affected"},{"version":"10.9.0","status":"unaffected"},{"version":"10.5.6","status":"unaffected"},{"version":"9.11.16","status":"unaffected"},{"version":"10.8.1","status":"unaffected"},{"version":"10.7.3","status":"unaffected"},{"version":"10.6.6","status":"unaffected"}],"vendor":"Mattermost","product":"Mattermost","source":"cvelist"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.0.0-20250519205859-65aec10162f6"}],"ecosystem":"Go","package":"github.com/mattermost/mattermost-server","purl":"pkg:golang/github.com/mattermost/mattermost-server","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"8.0.0-20250519205859-65aec10162f6"}],"ecosystem":"Go","package":"github.com/mattermost/mattermost/server/v8","purl":"pkg:golang/github.com/mattermost/mattermost/server/v8","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"10.5.0","status":"affected","fixed":"10.5.6"}],"ecosystem":"Go","package":"github.com/mattermost/mattermost/server/v8","purl":"pkg:golang/github.com/mattermost/mattermost/server/v8","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"9.11.0","status":"affected","fixed":"9.11.16"}],"ecosystem":"Go","package":"github.com/mattermost/mattermost/server/v8","purl":"pkg:golang/github.com/mattermost/mattermost/server/v8","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"10.8.0","status":"affected","fixed":"10.8.1"}],"ecosystem":"Go","package":"github.com/mattermost/mattermost/server/v8","purl":"pkg:golang/github.com/mattermost/mattermost/server/v8","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"10.7.0","status":"affected","fixed":"10.7.3"}],"ecosystem":"Go","package":"github.com/mattermost/mattermost/server/v8","purl":"pkg:golang/github.com/mattermost/mattermost/server/v8","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"10.6.0","status":"affected","fixed":"10.6.6"}],"ecosystem":"Go","package":"github.com/mattermost/mattermost/server/v8","purl":"pkg:golang/github.com/mattermost/mattermost/server/v8","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.0.0-20250519205859-65aec10162f6"},{"type":"semver","introduced":"9.11.0+incompatible","status":"affected","fixed":"9.11.16+incompatible"},{"type":"semver","introduced":"10.5.0+incompatible","status":"affected","fixed":"10.5.6+incompatible"},{"type":"semver","introduced":"10.6.0+incompatible","status":"affected","fixed":"10.6.6+incompatible"},{"type":"semver","introduced":"10.7.0+incompatible","status":"affected","fixed":"10.7.3+incompatible"},{"type":"semver","introduced":"10.8.0+incompatible","status":"affected","fixed":"10.8.1+incompatible"}],"ecosystem":"Go","package":"github.com/mattermost/mattermost-server","purl":"pkg:golang/github.com/mattermost/mattermost-server","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/mattermost/mattermost-server/v5","purl":"pkg:golang/github.com/mattermost/mattermost-server/v5","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected"}],"ecosystem":"Go","package":"github.com/mattermost/mattermost-server/v6","purl":"pkg:golang/github.com/mattermost/mattermost-server/v6","source":"go"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"8.0.0-20250519205859-65aec10162f6"}],"ecosystem":"Go","package":"github.com/mattermost/mattermost/server/v8","purl":"pkg:golang/github.com/mattermost/mattermost/server/v8","source":"go"},{"ranges":[{"status":"affected","introduced":"9.11.0","fixed":"9.11.16"},{"status":"affected","introduced":"10.5.0","fixed":"10.5.6"},{"status":"affected","introduced":"10.6.0","fixed":"10.6.6"},{"status":"affected","introduced":"10.7.0","fixed":"10.7.3"},{"status":"affected","version":"10.8.0"},{"status":"affected","version":"10.8.0"},{"status":"affected","version":"10.8.0"},{"status":"affected","version":"10.8.0"}],"vendor":"mattermost","product":"mattermost_server","cpe":"cpe:2.3:a:mattermost:mattermost_server:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://mattermost.com/security-updates","tags":["vendor-advisory","web"],"sources":["cvelist","ghsa","go","nvd"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2025-4981","tags":["advisory"],"sources":["ghsa","go"]},{"url":"https://github.com/mattermost/mattermost/commit/65aec10162f612d98edf91cc66bf7e781868448b","tags":["web"],"sources":["ghsa","go"]},{"url":"https://github.com/mattermost/mattermost","tags":["package"],"sources":["ghsa"]},{"url":"https://github.com/advisories/GHSA-qh58-9v3j-wcjc","tags":["advisory"],"sources":["go"]}],"credits":["Dawid Kulikowski (daw10)"],"assigner":"Mattermost","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2025-06-20T13:06:30.529Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2025-4981","url":"https://www.cve.org/CVERecord?id=CVE-2025-4981","licence":"CVE Terms of Use","modified":"2025-06-20T13:10:32.981Z"},{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-qh58-9v3j-wcjc","url":"https://github.com/advisories/GHSA-qh58-9v3j-wcjc","licence":"CC-BY-4.0","modified":"2025-07-28T20:42:05.354Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2025-3769","url":"https://pkg.go.dev/vuln/GO-2025-3769","licence":"CC-BY-4.0","modified":"2026-03-03T04:57:20.146Z"},{"source":"nvd","name":"NVD","id":"CVE-2025-4981","url":"https://nvd.nist.gov/vuln/detail/CVE-2025-4981","licence":"Public domain","modified":"2026-06-17T09:34:26.060Z"}],"updatedAt":"2026-11-25T22:58:59.427Z","epss":{"score":0.0106,"percentile":0.65489,"date":"2026-12-01T12:00:22.000Z"}}