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

- Severity: High 7.3 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 3.73%, higher than 90% of CVEs (2026-12-01)
- Published: 2021-10-14T19:55:12.000Z
- Modified: 2026-09-08T08:46:01.199Z
- Also known as: BIT-COUCHDB-2021-38295
- Weaknesses: CWE-79
- Assigned by: apache

## Description

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

(As written by CVE List.)

## Affected

- Apache Software Foundation Apache CouchDB: from Apache CouchDB before 3.1.2
- Apache Software Foundation IBM Cloudant: from IBM Cloudant before 8201
- apache couchdb: before 3.1.2
- couchdb (Bitnami): before 3.1.2

## Every score

- NVD: CVSS:3.1 7.3 High `CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H`
- NVD: CVSS:2.0 6.0 Medium `AV:N/AC:M/Au:S/C:P/I:P/A:P`
- Bitnami Vulnerability Database: rating High

## References

- <https://docs.couchdb.org/en/stable/cve/2021-38295.html> (advisory, vendor-advisory)
- <https://nvd.nist.gov/vuln/detail/CVE-2021-38295> (web)

## Sources

- CVE List: [CVE-2021-38295](https://www.cve.org/CVERecord?id=CVE-2021-38295), CVE Terms of Use, modified 2024-08-04
- NVD: [CVE-2021-38295](https://nvd.nist.gov/vuln/detail/CVE-2021-38295), Public domain, modified 2026-06-17
- Bitnami Vulnerability Database: [BIT-COUCHDB-2021-38295](https://osv.dev/vulnerability/BIT-COUCHDB-2021-38295), Apache-2.0, modified 2026-09-08

---

Page: https://cve.day/CVE-2021-38295 · Whole record: https://cve.day/CVE-2021-38295.json · Rebuilt by cve.day 2026-11-25T22:58:04.500Z
