CVE-2025-4981

CVE-2025-4981 is a critical-severity vulnerability in Mattermost Mattermost Server with a CVSS 3.x base score of 9.9. It is not currently listed as actively exploited by CISA, and its EPSS exploit-prediction score is low. The underlying weakness is classified as CWE-427.

Key facts

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.

Frequently asked questions

What is CVE-2025-4981?
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.
How severe is CVE-2025-4981?
CVE-2025-4981 has a CVSS 3.x base score of 9.9, rated critical severity. It is exploitable over network with low attack complexity, requires low privileges and no user interaction. Impact on confidentiality is high, integrity high, and availability high.
Is CVE-2025-4981 being actively exploited?
It is not currently listed in CISA's KEV catalog. Its EPSS exploit-prediction score is 1% (48th percentile), an estimate of the probability of exploitation in the next 30 days.
What products are affected by CVE-2025-4981?
CVE-2025-4981 primarily affects Mattermost Mattermost Server. In total, 5 product configurations (CPEs) are listed as vulnerable; see the affected-products list for the exact versions.
How do I fix CVE-2025-4981?
Review the linked vendor and NVD advisories for patched versions and mitigations, then upgrade or apply the recommended workaround. Given its critical severity, prioritise patching exposed systems.
Does CVE-2025-4981 have an EU (EUVD) identifier?
Yes. CVE-2025-4981 is tracked in the ENISA EU Vulnerability Database (EUVD) as EUVD-2025-28315.
When was CVE-2025-4981 published?
CVE-2025-4981 was published on 2025-06-20 and last updated on 2026-06-17.

References

Affected products (5)

More vulnerabilities in Mattermost Mattermost Server

All CVEs affecting Mattermost Mattermost Server →

Other CWE-427 (Uncontrolled Search Path Element) vulnerabilities

Browse all CWE-427 (Uncontrolled Search Path Element) vulnerabilities →