CVE-2021-37860 Cross-site Scripting in Mattermost
An attacker can inject arbitrary web script via unsanitized clipboard contents in Mattermost deployments with disabled Content Security Policy.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Over the internet
- Victim action needed
- A user has to click or open something
- Fix
- Available
What is CVE-2021-37860?
CVE-2021-37860 is a low-severity cross-site scripting vulnerability in Mattermost Mattermost, published on 22 Sep 2021. Any signed-in user can exploit it over the network, and only if a user opens a file or follows a link.
Official description
Mattermost 5.38 and earlier fails to sufficiently sanitize clipboard contents, which allows a user-assisted attacker to inject arbitrary web script in product deployments that explicitly disable the default CSP.
Weakness: CWE-79
Which versions are affected by CVE-2021-37860?
4 open source packages ship an affected version, including github.com/mattermost/mattermost-server/v5 and github.com/mattermost/mattermost-server. It affects 1 product.
| Package | Affected | Fixed in |
|---|---|---|
github.com/mattermost/mattermost-server/v5 Go | All versions | 5.39.0 |
github.com/mattermost/mattermost-server/v5 Go | All versions | 5.39.0 |
github.com/mattermost/mattermost-server/v5 Go | All versions | 5.39.0 |
github.com/mattermost/mattermost-server Go | All versions | None |
Products include Mattermost Mattermost.
How do I fix CVE-2021-37860?
Upgrade github.com/mattermost/mattermost-server/v5 to 5.39.0 or later.
Escape output for the context it lands in and set a strict Content Security Policy. Upgrading the affected component is the real fix. More about Cross-site scripting.
Is CVE-2021-37860 being exploited?
There is no known exploitation of CVE-2021-37860 in the wild and no public exploit code.
Other vulnerabilities in Mattermost Mattermost
- CVE-2019-20851 Path traversal in n/a
- CVE-2024-39274 Malicious remote can add users to arbitrary teams and channels
- CVE-2024-39777 Malicious remote can invite itself to an arbitrary local channel
- CVE-2024-39830 Timing attack during remote cluster token comparison when shared channels are enabled
- CVE-2023-3615 Lack of server certificate validation in websockets connection
Sources
Also known as GHSA-hv5f-73mr-7vvj, GO-2022-0604.