
Cloud Vulnerability DB
A community-led vulnerabilities database
CVE-2025-4981 is a critical path traversal vulnerability in Mattermost Server that allows authenticated users to write files to arbitrary locations on the filesystem via maliciously crafted archive uploads, potentially leading to remote code execution. It affects 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, and 10.6.x ≤ 10.6.5. The vulnerability was published on June 20, 2025, with patches released the same day. It carries a CVSS v3.1 base score of 9.9 (Critical) (GitHub Advisory, Mattermost Security).
The root cause is insufficient filename sanitization in Mattermost's archive extractor component (CWE-427: Uncontrolled Search Path Element). When a user uploads an archive (e.g., ZIP or similar) containing filenames with path traversal sequences (e.g., ../../), the extractor writes the file contents to attacker-controlled locations on the server filesystem without proper validation. Exploitation requires two default-enabled configuration settings to be active: FileSettings.EnableFileAttachments = true and FileSettings.ExtractContent = true. The attack is network-based, requires only low-privilege authentication, and needs no user interaction, making it highly accessible to any registered Mattermost user (GitHub Advisory).
Successful exploitation allows an authenticated attacker to write arbitrary files anywhere on the server filesystem accessible to the Mattermost process, which can directly lead to remote code execution — for example, by overwriting server-side scripts, configuration files, or planting web shells. The vulnerability has a Changed scope in CVSS, meaning impacts extend beyond the Mattermost application itself to the underlying host system. Full confidentiality, integrity, and availability compromise of the affected server is possible, with potential for lateral movement within the hosting environment (GitHub Advisory, Security Online).
../../var/www/html/shell.php, with a malicious payload (e.g., a web shell) as the file content.ExtractContent = true)./var/www/, /tmp/, or system directories); archive files uploaded by users containing filenames with ../ or ..\ sequences; newly created scripts or executables owned by the Mattermost service account in non-standard locations.Mattermost has released patched versions: 9.11.16, 10.5.6, 10.6.6, 10.7.3, 10.8.1. Administrators should upgrade to one of these versions immediately. As a temporary workaround if patching is not immediately possible, disable either FileSettings.EnableFileAttachments or FileSettings.ExtractContent in the Mattermost server configuration — disabling either setting prevents exploitation. Additionally, restrict file upload permissions to trusted users and monitor server logs for suspicious archive upload activity (GitHub Advisory, Mattermost Security).
The vulnerability received notable attention from the security community upon disclosure on June 20, 2025, given its critical CVSS score of 9.9. Security researchers and aggregators including SecurityOnline, Black Kite, and the Canadian Centre for Cyber Security (CCCS) published advisories and analysis highlighting the risk (Security Online, CCCS Advisory). Social media posts on Mastodon and Bluesky from security researchers flagged the vulnerability as high-priority for organizations using Mattermost. Black Kite included it in their TPRM (Third-Party Risk Management) Focus Friday analysis, emphasizing supply chain and enterprise risk implications (Black Kite).
Source: This report was generated using AI
Free Vulnerability Assessment
Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.
Get a personalized demo
"Best User Experience I have ever seen, provides full visibility to cloud workloads."
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
"We know that if Wiz identifies something as critical, it actually is."