{"id":"CVE-2025-4981","published":"2025-06-20T10:27:13Z","modified":"2025-06-20T13:10:32Z","title":"Path Traversal Leading to RCE by Any Authenticated Mattermost User","vendor":"Mattermost","product":"Mattermost","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.9,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.0106,"percentile":0.65378,"provenance":"source"},"cwes":[{"id":"CWE-427","name":"Uncontrolled Search Path Element"}],"references":[{"url":"https://mattermost.com/security-updates","tags":[]}],"priority":{"score":20.0,"factors":[{"name":"EPSS percentile","points":13.08},{"name":"CVSS severity","points":6.93}]},"vendorSlug":"mattermost","affectedVersions":[{"vendor":"Mattermost","product":"Mattermost","versions":[">= 10.5.0, <= 10.5.5",">= 9.11.0, <= 9.11.15",">= 10.8.0, <= 10.8.0",">= 10.7.0, <= 10.7.2",">= 10.6.0, <= 10.6.5"]}],"fixedVersions":[{"vendor":"Mattermost","product":"Mattermost","versions":["10.9.0","10.5.6","9.11.16","10.8.1","10.7.3","10.6.6"]}],"solutions":{"items":["Update Mattermost to versions 10.9.0, 10.5.6, 9.11.16, 10.8.1, 10.7.3, 10.6.6 or higher."],"from":"CVE.org CNA","provenance":"source"},"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total","timestamp":"2025-06-20T13:06:30.529064Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"github.com/mattermost/mattermost-server","vulnerableRanges":["<0.0.0-20250519205859-65aec10162f6",">=9.11.0+incompatible, <9.11.16+incompatible",">=10.5.0+incompatible, <10.5.6+incompatible",">=10.6.0+incompatible, <10.6.6+incompatible",">=10.7.0+incompatible, <10.7.3+incompatible",">=10.8.0+incompatible, <10.8.1+incompatible"],"patched":["0.0.0-20250519205859-65aec10162f6","9.11.16+incompatible","10.5.6+incompatible","10.6.6+incompatible","10.7.3+incompatible","10.8.1+incompatible"],"from":["GHSA-qh58-9v3j-wcjc","GO-2025-3769"],"provenance":"source"},{"ecosystem":"Go","package":"github.com/mattermost/mattermost/server/v8","vulnerableRanges":["<8.0.0-20250519205859-65aec10162f6",">=10.5.0, <10.5.6",">=9.11.0, <9.11.16",">=10.8.0, <10.8.1",">=10.7.0, <10.7.3",">=10.6.0, <10.6.6"],"patched":["8.0.0-20250519205859-65aec10162f6","10.5.6","9.11.16","10.8.1","10.7.3","10.6.6"],"from":["GHSA-qh58-9v3j-wcjc","GO-2025-3769"],"provenance":"source"},{"ecosystem":"Go","package":"github.com/mattermost/mattermost-server/v5","vulnerableRanges":["all versions"],"patched":[],"from":["GO-2025-3769"],"provenance":"source"},{"ecosystem":"Go","package":"github.com/mattermost/mattermost-server/v6","vulnerableRanges":["all versions"],"patched":[],"from":["GO-2025-3769"],"provenance":"source"}],"summary":{"text":"Mattermost (versions 10.5.x up to 10.5.5, 9.11.x up to 9.11.15, 10.8.x up to 10.8.0, 10.7.x up to 10.7.2, and 10.6.x up to 10.6.5) fails to sanitise filenames in its archive extractor, a flaw affecting instances where file uploads and content extraction for document search are enabled. An authenticated user who uploads an archive containing path traversal sequences in its filenames can write files to arbitrary locations on the filesystem, which can potentially lead to remote code execution; no user interaction is required.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T07:14:40Z"},"euvd":{"id":"EUVD-2025-28315","exploited":false,"provenance":"source"},"lineage":{"familyId":"fam-mattermost-cve-2025-4981","children":[{"from":"CVE-2025-4981","to":"CVE-2026-6340","relation":"related","confidence":"medium","kind":"lineage","evidence":[{"kind":"same-code","provenance":"machine","files":["server/platform/services/docextractor/archive.go"],"commits":["https://github.com/mattermost/mattermost/commit/65aec10162f612d98edf91cc66bf7e781868448b","https://github.com/mattermost/mattermost/commit/fb11968f8798925c7b75711025bc5f991124ba26"],"basis":"rarely changed file"}]}],"packageHistory":[{"cve":"CVE-2025-3227","published":"2025-06-20","fixed":"10.8.1+incompatible","kev":false,"link":{"from":"CVE-2025-4981","to":"CVE-2025-3227","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"Go:github.com/mattermost/mattermost-server","fromFixed":"0.0.0-20250519205859-65aec10162f6","toFixed":"0.0.0-20250520060012-d0380305ef7a","daysApart":0},{"kind":"version-step","provenance":"source","package":"Go:github.com/mattermost/mattermost/server/v8","fromFixed":"8.0.0-20250519205859-65aec10162f6","toFixed":"8.0.0-20250520060012-d0380305ef7a","daysApart":0}]}},{"cve":"CVE-2025-3228","published":"2025-06-20","fixed":"10.8.1+incompatible","kev":false,"link":{"from":"CVE-2025-4981","to":"CVE-2025-3228","relation":"successor","confidence":"low","kind":"sequence","orderedBy":"description","evidence":[{"kind":"version-step","provenance":"source","package":"Go:github.com/mattermost/mattermost-server","fromFixed":"0.0.0-20250519205859-65aec10162f6","toFixed":"0.0.0-20250520060012-d0380305ef7a","daysApart":0},{"kind":"version-step","provenance":"source","package":"Go:github.com/mattermost/mattermost/server/v8","fromFixed":"8.0.0-20250519205859-65aec10162f6","toFixed":"8.0.0-20250520060012-d0380305ef7a","daysApart":0}]}},{"cve":"CVE-2025-46702","published":"2025-06-30","fixed":"10.8.1+incompatible","kev":false},{"cve":"CVE-2025-47871","published":"2025-06-30","fixed":"10.8.1+incompatible","kev":false},{"cve":"CVE-2025-4981","published":"2025-06-20","fixed":"10.8.1+incompatible","kev":false},{"cve":"CVE-2025-6226","published":"2025-07-18","fixed":"10.8.2+incompatible","kev":false},{"cve":"CVE-2025-6233","published":"2025-07-18","fixed":"10.8.2+incompatible","kev":false},{"cve":"CVE-2025-36530","published":"2025-08-21","fixed":"10.9.2+incompatible","kev":false}],"package":"Go:github.com/mattermost/mattermost-server"}}