CVE-2025-4981: mattermost Uncontrolled Search Path Element
Vulnerability summary
CVE-2025-4981 is a critical (CVSS 9.9) Uncontrolled Search Path Element vulnerability in mattermost. EPSS estimates a 0.84% chance of exploitation in the next 30 days, higher than 57.3% of scored vulnerabilities.
Advisory lineage
Upstream 0 · Downstream 1 · Related 1Timeline
- 20-06-2025PublishedVulnerability first disclosed.
- 20-06-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
3 scores · 3 sources · 1 version- OSV · GoEcosystem advisory · calculated9.9CriticalCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
- NVDNIST9.9CriticalCVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H
EPSS trend
Probability
0.84%
Chance of exploitation in the next 30 days
Percentile
57%
Versus all other CVEs
30-day change
-0.01 pp
From 0.85% on 21-09-2026
Known exploited
Compare KEV catalogsNot in any of the 3 tracked catalogs.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Github.com/mattermost/mattermost-server2 products
- v5All versions (No fix recorded)
- v6All versions (No fix recorded)
Mattermost2 products
- mattermost≥ 10.5.0, ≤ 10.5.5 | ≥ 9.11.0, ≤ 9.11.15 | 10.8.0 | ≥ 10.7.0, ≤ 10.7.2 | ≥ 10.6.0, ≤ 10.6.5
- mattermost_serverEOL≥ 9.11.0, < 9.11.16 | ≥ 10.5.0, < 10.5.6 | ≥ 10.6.0, < 10.6.6 | ≥ 10.7.0, < 10.7.3 | 10.8.0 | 10.8.0:rc1 | 10.8.0:rc2 | 10.8.0:rc3
Github.com/mattermost1 product
- mattermost-server< 0.0.0-20250519205859-65aec10162f6 | ≥ 10.8.0+incompatible, < 10.8.1+incompatible
Github.com/mattermost/mattermost/server1 product
- v8≥ 10.5.0, < 10.5.6 | ≥ 9.11.0, < 9.11.16 | ≥ 10.8.0, < 10.8.1 | ≥ 10.7.0, < 10.7.3 | ≥ 10.6.0, < 10.6.6 | < 8.0.0-20250519205859-65aec10162f6
4 vendors · 6 products