Loading...
Skip to main content

CVE-2025-4981 — Vulnerability in...

CRITICAL

Mattermost allows authenticated users to write files to arbitrary locations

Published June 20, 2025Updated July 28, 2025Source: osv

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.

Advisory Timeline

  • First published June 20, 2025 (479 days ago).
  • Last revised July 28, 2025 — 38 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Go
Update github.com/mattermost/mattermost/server/v8 to 9.11.16 or later
go get github.com/mattermost/mattermost/server/v8@v9.11.16
Go
Update github.com/mattermost/mattermost/server/v8 to 10.6.6 or later
go get github.com/mattermost/mattermost/server/v8@v10.6.6
Go
Update github.com/mattermost/mattermost/server/v8 to 10.7.3 or later
go get github.com/mattermost/mattermost/server/v8@v10.7.3
Go
Update github.com/mattermost/mattermost-server to 0.0.0-20250519205859-65aec10162f6 or later
go get github.com/mattermost/mattermost-server@v0.0.0-20250519205859-65aec10162f6
Go
Update github.com/mattermost/mattermost/server/v8 to 8.0.0-20250519205859-65aec10162f6 or later
go get github.com/mattermost/mattermost/server/v8@v8.0.0-20250519205859-65aec10162f6
Go
Update github.com/mattermost/mattermost/server/v8 to 10.8.1 or later
go get github.com/mattermost/mattermost/server/v8@v10.8.1
Go
Update github.com/mattermost/mattermost/server/v8 to 10.5.6 or later
go get github.com/mattermost/mattermost/server/v8@v10.5.6

After upgrading, run your dependency scanner again to confirm the vulnerability is resolved.

Affected Packages (7)

Affects 1 ecosystem: go (2).

PackageEcosystemAffectedFixed In
github.com/mattermost/mattermost/server/v8
go
All versions9.11.16
github.com/mattermost/mattermost/server/v8
go
All versions10.6.6
github.com/mattermost/mattermost/server/v8
go
All versions10.7.3
github.com/mattermost/mattermost-server
go
All versions0.0.0-20250519205859-65aec10162f6
github.com/mattermost/mattermost/server/v8
go
All versions8.0.0-20250519205859-65aec10162f6
github.com/mattermost/mattermost/server/v8
go
10.8.010.8.1
github.com/mattermost/mattermost/server/v8
go
All versions10.5.6

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.9 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Changed
Confidentiality
High
Integrity
High
Availability
High

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H

Frequently Asked Questions

What is CVE-2025-4981?
Mattermost allows authenticated users to write files to arbitrary locations This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.9/10).
How do I check if my project is affected by CVE-2025-4981?
CVE-2025-4981 affects github.com/mattermost/mattermost/server/v8 and github.com/mattermost/mattermost-server. Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2025-4981 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.9

Exploitation is straightforward and causes maximum impact. Patch immediately.

Also Known As

GHSA-qh58-9v3j-wcjc
GO-2025-3769

Related CVEs

  • CVE-2025-12419
    CRITICAL

    Mattermost fails to properly validate OAuth state tokens during OpenID Connect authentication

  • CVE-2025-12421
    CRITICAL

    Mattermost fails to to verify the token used during code exchange

  • CVE-2026-7387
    HIGH

    Mattermost doesn't require role-management authorization when setting the scheme_admin flag on group syncable link and patch endpoints

  • CVE-2025-58073
    HIGH

    Mattermost has a Missing Authorization vulnerability

  • CVE-2026-6961
    HIGH

    Mattermost doesn't sanitize FileInfo.Name received from federated peers during shared channel file sync

  • CVE-2026-6346
    HIGH

    Mattermost doesn't sanitize sensitive configuration fields before including them in support packet generation

  • CVE-2026-24458
    HIGH

    Mattermost fails to properly handle very long passwords

  • CVE-2025-9079
    HIGH

    Mattermost Path Traversal vulnerability

Check if you're affected

Scan your dependencies to see if this vulnerability affects your projects.

Scan Your Dependencies