Security advisory
In Apache CouchDB, a malicious user with permission to create documents in a database is able to attach a HTML attachment to a document. If a CouchDB admin opens that attachment in a browser, e.g. via the CouchDB admin interface Fauxton, any JavaScript code embedded in that HTML attachment will be executed within the security context of that admin. A similar route is available with the already deprecated _show and _list functionality. This privilege escalation vulnerability allows an attacker to add or remove data in any database or make configuration changes. This issue affected Apache CouchDB prior to 3.1.2
- Products
- Not specified
- Affected versions
- Not specified
- Fixed versions
- Not specified
- CVEs
- CVE-2021-38295
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 06:06 UTC · Revision 1
Source evidence
In Apache CouchDB, a malicious user with permission to create documents in a database is able to attach a HTML attachment to a document. If a CouchDB admin opens that attachment in a browser, e.g. via the CouchDB admin interface Fauxton, any JavaScript code embedded in that HTML attachment will be executed within the security context of that admin. A similar route is available with the already deprecated _show and _list functionality. This privilege escalation vulnerability allows an attacker to add or remove data in any database or make configuration changes. This issue affected Apache CouchDB prior to 3.1.2
osv:CVE-2021-38295
Complete source record
{
"id": "57d57b2d23387e85868276b23fe9aa8e7d6472ad870aeddf248d7463769e5b87",
"url": "https://osv.dev/vulnerability/CVE-2021-38295",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "CVE-2021-38295",
"summary": "In Apache CouchDB, a malicious user with permission to create documents in a database is able to attach a HTML attachment to a document. If a CouchDB admin opens that attachment in a browser, e.g. via the CouchDB admin interface Fauxton, any JavaScript code embedded in that HTML attachment will be executed within the security context of that admin. A similar route is available with the already deprecated _show and _list functionality. This privilege escalation vulnerability allows an attacker to add or remove data in any database or make configuration changes. This issue affected Apache CouchDB prior to 3.1.2",
"evidence": "osv:CVE-2021-38295",
"products": [],
"severity": "high",
"structured": {
"id": "CVE-2021-38295",
"aliases": [
"BIT-couchdb-2021-38295",
"CVE-2021-38295"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H"
}
],
"affected": [
{
"ranges": [
{
"repo": "https://github.com/apache/couchdb",
"type": "GIT",
"events": [
{
"introduced": "0"
},
{
"fixed": "572b68e724ddb53d0bd04f56b3e0a3ff0d05cdf1"
}
],
"database_specific": {
"extracted_events": [
{
"cpe": "cpe:2.3:a:apache:couchdb:*:*:*:*:*:*:*:*",
"range": [
{
"introduced": "0"
},
{
"fixed": "3.1.2"
}
],
"source": "CPE_RANGE"
}
]
}
}
],
"versions": [
"3.1.1-RC2",
"3.1.1",
"3.1.1-RC1",
"3.1.0-RC2",
"3.1.0",
"3.1.0-RC1",
"3.0.0-RC1",
"2.3.1-last",
"2.3.0-RC1",
"2.3.0",
"2.2.0-RC1",
"2.1.0-RC1",
"2.1.0",
"2.0.0-RC4",
"2.0.0-RC3",
"2.0.0-RC1",
"fauxton"
],
"database_specific": {
"source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2021-38295.json"
}
}
],
"modified": "2026-10-24T10:30:35.454355766Z",
"provider": "osv",
"references": [
"https://docs.couchdb.org/en/stable/cve/2021-38295.html"
],
"provider_metadata": {}
},
"related_cves": [
{
"value": "CVE-2021-38295",
"evidence": "/id"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 433736,
"published_at": "2021-10-14T20:15:09.017+00:00"
}