Security advisory
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.
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-39221
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 11:53 UTC · Revision 1
Source evidence
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.
osv:CVE-2021-39221
Complete source record
{
"id": "5b6f836ac6a4a67bdebdeb0194bdadcdbbacf74b667da2d6ae2adc44e68fff22",
"url": "https://osv.dev/vulnerability/CVE-2021-39221",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-39221",
"summary": "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.",
"evidence": "osv:CVE-2021-39221",
"products": [],
"severity": "medium",
"structured": {
"id": "CVE-2021-39221",
"aliases": [
"CVE-2021-39221",
"GHSA-j6cx-mxqf-f9vc"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:L/UI:R/S:C/C:L/I:L/A:N"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/nextcloud/contacts",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "ca6b1e05e25534e6d7eba80d4dce6a215ec06053"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:nextcloud:contacts:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "4.0.3"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"v4.0.2",
"v4.0.0",
"v4.0.0-rc.0",
"v4.0.0-beta.3",
"v4.0.0-beta.2",
"v3.5.1",
"v3.5.0",
"v3.4.3",
"v3.4.2",
"v3.4.1",
"v3.4.0",
"v3.3.0",
"v3.2.0",
"v3.1.9",
"v3.1.6",
"v3.1.5",
"v3.1.4",
"v3.1.3",
"v3.1.2",
"v3.1.1",
"v3.1.0",
"v3.0.1",
"v3.0.0",
"v3.0.0-beta1",
"v3.0.0-alpha1",
"v2.1.6-beta",
"v2.1.6",
"v2.1.5",
"v2.1.4",
"v2.1.3",
"v2.1.2",
"v2.1.1",
"v2.1.0",
"v2.0.1",
"2.0.0"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-39221.json"
}
}
],
"modified": "2026-10-20T10:54:53.697928441Z",
"provider": "osv",
"references": [
"https://github.com/nextcloud/contacts/pull/2407",
"https://github.com/nextcloud/security-advisories/security/advisories/GHSA-j6cx-mxqf-f9vc"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2021-39221",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 386389,
"published_at": "2021-10-25T19:15:09.73+00:00"
}