Mattermost: Uncontrolled Search Path Element
CVE-2025-4981 is a critical-severity uncontrolled search path element vulnerability in Mattermost, with a CVSS 3.1 base score of 9.9 out of 10. It can be exploited remotely over the network by an attacker with a low-privileged account, without any action from a user. Affected Mattermost versions: 10.5.0 through 10.5.5; 9.11.0 through 9.11.15; 10.8.0 and earlier, and others listed below. The record does not name a fixed version, so check the vendor advisory. There is no confirmed exploitation so far. EPSS estimates a 1.02% chance of exploitation within 30 days, higher than 64% of scored CVEs.
Critical severity: a successful attack would have severe impact.
What to do
- Update Mattermost Server to 9.11.16 or 10.5.6 or 10.6.6 or 10.7.3, whichever matches your release line, or a later version.
- Read the advisory on mattermost.com for workarounds and exact fixed builds.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Mattermost | Mattermost | 10.5.0 through 10.5.5; 9.11.0 through 9.11.15; 10.8.0 and earlier; 10.7.0 through 10.7.2; 10.6.0 through 10.6.5 | Not stated |
| Mattermost | Mattermost Server | 9.11.0 up to, but not including, 9.11.16; 10.5.0 up to, but not including, 10.5.6; 10.6.0 up to, but not including, 10.6.6; 10.7.0 up to, but not including, 10.7.3; 10.8.0 | 9.11.16, 10.5.6, 10.6.6, 10.7.3 |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- NetworkCan be exploited remotely over a network, including the internet.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- LowA basic user account is enough.
- User interaction
- NoneNo action by a victim is required.
- Scope
- ChangedThe attack can reach beyond the vulnerable component into other systems.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:H/I:H/A:H. Scored by CNA (mattermost.com).
Official description
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.
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Uncontrolled Search Path Element
The product uses a fixed or controlled search path to find resources, but one or more locations in that path can be under the control of unintended actors.
How developers prevent this class of flaw
- Hard-code the search path to a set of known-safe values (such as system directories), or only allow them to be specified by the administrator in a configuration file. Do not allow these settings to be modified by an external party. Be careful to avoid related weaknesses such as CWE-426 and CWE-428.
- When invoking other programs, specify those programs using fully-qualified pathnames. While this is an effective approach, code that uses fully-qualified pathnames might not be portable to other systems that do not use the same pathnames. The portability can be improved by locating the full-qualified paths in a centralized, easily-modifiable location within the source code, and having the code refer to these paths.
- Remove or restrict all environment settings before invoking other programs. This includes the PATH environment variable, LD_LIBRARY_PATH, and other settings that identify the location of code libraries, and any application-specific search paths.
More Uncontrolled Search Path Element vulnerabilities (CWE-427)
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: total).
- Record last changed materially (score, affected products, status or references).
References
Advisories
Other vulnerabilities in Mattermost
- 8.0 High severity
- 7.1 High severity
- 9.3 Critical severity
- 7.1 High severity
Recent Uncontrolled Search Path Element vulnerabilities
- 7.8 High severity
- 7.8 High severity
- 8.8 High severity
- 7.5 High severity
- 7.3 High severity
- 7.8 High severity
Spotted an error? Tell us.