Path Traversal Leading to RCE by Any Authenticated Mattermost User
Mattermost
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| github.com/mattermost/mattermost-server Go |
|
Mattermost
| Product | Affected | Fixed in |
|---|---|---|
| github.com/mattermost/mattermost-server Go |
|
0.0.0-20250519205859-65aec10162f69.11.16+incompatible10.5.6+incompatible10.6.6+incompatible10.7.3+incompatible10.8.1+incompatible| github.com/mattermost/mattermost/server/v8 Go |
|
|
| github.com/mattermost/mattermost-server/v5 Go |
| No fix yet |
| github.com/mattermost/mattermost-server/v6 Go |
| No fix yet |
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.
From the CVE record · Mattermost
Mattermost’s archive extractor does not sanitize filenames in uploaded archives. An authenticated user can upload an archive with path traversal sequences to write files to arbitrary filesystem locations, potentially leading to remote code execution. This affects instances with file attachments and content extraction enabled; both settings are enabled by default.
Check Mattermost instances on 9.11.x through 9.11.15, 10.5.x through 10.5.5, 10.6.x through 10.6.5, 10.7.x through 10.7.2, or 10.8.0, and users of the affected Go packages, including all versions of mattermost-server/v5 and /v6.