# CVE-2021-38295: Privilege escalation vulnerability when using HTML attachments

- Priority: **Routine**
- Reason: Not severe (CVSS 7.3, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2021-10-14 · Modified: 2024-08-04
- Aliases: MGASA-2021-0520, UBUNTU-CVE-2021-38295
- Record: https://cvemate.com/vulnerability/CVE-2021-38295 · JSON: https://cvemate.com/vulnerability/CVE-2021-38295/json

## Description

```text
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
```

## Signals

- CVSS: 7.3 high (v3.1, NVD) CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H
- EPSS: 3.731%, percentile 90.182%, as of 2026-12-05
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected

- apache software foundation apache couchdb: ≥ Apache CouchDB, \< 3.1.2
- apache software foundation ibm cloudant: ≥ IBM Cloudant, \< 8201
- apache couchdb: \< 3.1.2
- ubuntu couchdb (Ubuntu): All versions (No fix recorded)
- mageia couchdb (Mageia): \< 3.1.2-1.mga8

## References

- <https://docs.couchdb.org/en/stable/cve/2021-38295.html>
- <https://advisories.mageia.org/MGASA-2021-0520.html>
- <https://bugs.mageia.org/show_bug.cgi?id=29548>
- <https://www.openwall.com/lists/oss-security/2021/10/12/2>
- <https://ubuntu.com/security/CVE-2021-38295>
- <https://www.cve.org/CVERecord?id=CVE-2021-38295>

---

Data as of 2026-12-06T06:08:58.574Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
