Advisory

GHSA-qh58-9v3j-wcjc

Also known as: CVE-2025-4981, GO-2025-3769

Summary

Mattermost allows authenticated users to write files to arbitrary locations

Details

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.

Severity

Critical Basis: The source's own band: CRITICAL

Dates

Published
2025-06-20 12:30 UTC
Modified
2025-07-28 20:42 UTC

Affected packages and fixes

github.com/mattermost/mattermost-server

Go · All systems

Affected

  • introduced 0, fixed 0.0.0-20250519205859-65aec10162f6 (semver)

Fixed versions

0.0.0-20250519205859-65aec10162f6

Fix

  • Fixed version 0.0.0-20250519205859-65aec10162f6
    go get github.com/mattermost/[email protected]

github.com/mattermost/mattermost/server/v8

Go · All systems

Affected

  • introduced 0, fixed 8.0.0-20250519205859-65aec10162f6 (semver)

Fixed versions

8.0.0-20250519205859-65aec10162f6

Fix

  • Fixed version 8.0.0-20250519205859-65aec10162f6
    go get github.com/mattermost/mattermost/server/[email protected]

github.com/mattermost/mattermost/server/v8

Go · All systems

Affected

  • introduced 10.5.0, fixed 10.5.6 (semver)

Fixed versions

10.5.6

Fix

github.com/mattermost/mattermost/server/v8

Go · All systems

Affected

  • introduced 9.11.0, fixed 9.11.16 (semver)

Fixed versions

9.11.16

Fix

github.com/mattermost/mattermost/server/v8

Go · All systems

Affected

  • introduced 10.8.0, fixed 10.8.1 (semver)

Fixed versions

10.8.1

Fix

github.com/mattermost/mattermost/server/v8

Go · All systems

Affected

  • introduced 10.7.0, fixed 10.7.3 (semver)

Fixed versions

10.7.3

Fix

github.com/mattermost/mattermost/server/v8

Go · All systems

Affected

  • introduced 10.6.0, fixed 10.6.6 (semver)

Fixed versions

10.6.6

Fix

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences