CVE-2021-37860 Cross-site Scripting in Mattermost

Low 3.7 Published Updated

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.

PackageAffectedFixed in
github.com/mattermost/mattermost-server/v5 GoAll versions5.39.0
github.com/mattermost/mattermost-server/v5 GoAll versions5.39.0
github.com/mattermost/mattermost-server/v5 GoAll versions5.39.0
github.com/mattermost/mattermost-server GoAll versionsNone

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.

All Mattermost Mattermost vulnerabilities

Sources

Also known as GHSA-hv5f-73mr-7vvj, GO-2022-0604.

Is CVE-2021-37860 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free