Mattermost ServerApplication · Mattermost

CVE-2025-4981

CRITICAL · 9.9 CVSS v3.1 Published 2025-06-20
Fix available
A fix is available. Upgrade to 9.11.16 / 10.5.6 or later.
See remediation →
100/100
Remediation priority · Urgent
Remotely reachable Zero-click

Official description Straight from the sourceThe vendor's or NVD's own wording, published unedited. Authoritative, but often terse — it says what broke, rarely what to do.

NVD · unedited
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.

Technical summary Written by usOur analysis, written from the advisory, the CVSS vector and the affected-version data. It adds context the advisory leaves out, and never invents facts that are not in the source.

dbcve analysis · high confidence

Mattermost fails to sanitize filenames in its archive extractor, allowing authenticated users to embed path traversal sequences (e.g., ../../) in archive filenames. When the system extracts these archives for content indexing (document search), files are written to arbitrary filesystem locations rather than intended directories, enabling potential remote code execution if attackers write to executable locations.

MitigationUpgrade to a patched Mattermost version, or if upgrading is not immediately feasible, disable the ExtractContent setting (FileSettings.ExtractContent = false) to prevent archive extraction.

Verify against the referenced sources before acting — the references below are authoritative for this CVE, this summary is not.

Affected products & versions What the vendor confirmedThe version ranges the vendor confirmed as vulnerable. If your version sits inside a range here, treat yourself as exposed until you have upgraded.

NVD · CPE data
Mattermost ServerApplication
Affected:>= 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

CVSS breakdown How the score is builtThe industry scoring standard. It rates how the flaw is reached, what it takes to exploit, and what an attacker gains — the score is derived from those, not the other way round.

From the vector
Attack vector
Network
Complexity
Low
Privileges
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

Am I affected? How to checkSteps we derive from the advisory and the affected-version data, so you can decide whether this CVE reaches your setup. They are a guide, not a scan — your own configuration is the authority.

dbcve checks

Work through these to decide whether this CVE applies to you.

  1. Check Mattermost Server version
    Log into the Mattermost System Console and navigate to About > Mattermost, or run 'mmctl version' from the server CLI, or inspect the version file in the Mattermost installation directory
    Affected if The installed version is 9.11.0 through 9.11.15, 10.5.0 through 10.5.5, 10.6.0 through 10.6.5, 10.7.0 through 10.7.2, or exactly 10.8.0
  2. Verify ExtractContent setting is enabled
    Check the Mattermost config.json file for 'FileSettings.ExtractContent' set to true, or run 'mmctl config get FileSettings.ExtractContent' from the server CLI
    Affected if ExtractContent is set to true (enabled); when disabled (false), the archive extraction feature that triggers the vulnerability is not active
  3. Confirm content indexing feature is in use
    Verify that document search indexing has been enabled and is processing files - check if users have uploaded archives (ZIP, tar.gz) that are being indexed for search
    Affected if The ExtractContent feature is actively processing uploaded archive files for the document search indexing; the vulnerability only triggers when archives are extracted during content indexing

You are affected if your Mattermost Server version falls within the affected ranges AND ExtractContent is enabled, because the path traversal vulnerability in the archive extractor requires both conditions to be exploitable.

Generated from the published advisory. Verify against your own configuration.

Check your environment

Paste your version and any relevant configuration and it will be compared against the affected criteria above. Do not include secrets or credentials.

AI-assisted, checked against the advisory. Informational, not a guarantee.

Remediation Closing itWhat it takes to close this. Where a vendor fix exists we point at it; where none exists we say so plainly, and can build one. Effort estimates are scoped from the advisory, not from your codebase.

dbcve · scoped
Upgrade available Upgrade to 9.11.16 / 10.5.6 / 10.6.6 or later
Fixed in 9.11.1610.5.610.6.6
Interim mitigation

Upgrade to a patched Mattermost version, or if upgrading is not immediately feasible, disable the ExtractContent setting (FileSettings.ExtractContent = false) to prevent archive extraction.

Recommended fix High confidence

Upgrade to Mattermost Server 9.11.16 (for 9.11.x users), 10.5.6 (for 10.5.x users), 10.6.6 (for 10.6.x users), or 10.7.3 (for 10.7.x users) - choose the version matching your current branch

  1. 1. Back up your Mattermost Server database and configuration files before upgrading.
  2. 2. Download the fixed version of Mattermost Server (9.11.16, 10.5.6, 10.6.6, or 10.7.3) from the official Mattermost download page.
  3. 3. Stop the Mattermost Server service.
  4. 4. Upgrade Mattermost Server to the appropriate fixed version for your branch.
  5. 5. Verify the upgrade was successful by checking the server version in the system console.
  6. 6. Restart the Mattermost Server service.
  7. 7. Test that file uploads and content extraction functionality work correctly after the upgrade.
Caveat Review Mattermost release notes for your target version to check for any breaking changes between your current version and the fixed version

Generated from the published advisory — verify against the referenced sources before acting.

Fix this in Mattermost Server Scoped from the published advisory
  • Consultation2.0 h
  • Implementation4.0 h
  • Testing3.0 h
  • Review / QA2.0 h
11.0 hours of engineering $1,930
Get the upgrade done

An estimate, not a bill — we confirm scope with you before any work starts. Need it this week? Rush from $3,088.

Scan for this in your stack

Free · runs locally
dbcve dependency scanner

Check whether your project pulls in CVE-2025-4981 — or any other known-vulnerable package — straight from your lock files. Free and open source; it runs locally and uploads nothing.

References Go to the primary sourcePrimary sources — vendor advisories, patches and trackers. Where our summary and a reference disagree, the reference wins.

Primary sources

Practitioner notes

Contributed

Peer-ranked notes from engineers who’ve handled CVE-2025-4981 in production — separate from our analysis above.

No notes yet

Be the first to add a field note for this CVE — a mitigation you’ve verified, a version caveat, or a link to a working fix. Sign in above to contribute.

What this is

A place for practitioners to share what actually worked: a mitigation you’ve tested, a configuration change, a version- or environment-specific caveat, or a link to a verified patch. The most useful notes rise to the top as peers upvote them, so the signal stays high.

What belongs here
  • Verified mitigations, workarounds, and config changes
  • Version or environment caveats, and links to real fixes
  • No weaponised exploit code, or anything meant to cause harm
  • No spam, self-promotion, credentials, or personal data