CVE-2021-38295 | Privilege escalation vulnerability when using HTML attachments

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

Published: 2021-10-14 Last update: 2026-06-17 Assigner: [email protected] Source: [email protected]

Conclusion & alert: CVE-2021-38295 is rated Moderate Risk (53/100): CVSS High severity, with medium exploitation likelihood (EPSS 2.47%). Mandatory action: Review affected assets and schedule remediation.

Risk is dynamic; we continuously reassess and refresh what is shown on this page as upstream context changes.

Exploit prediction scoring system (EPSS) score for CVE-2021-38295

EPSS lead: Daily EPSS estimates relative likelihood of exploitation; percentile ranks this CVE among scored vulnerabilities (higher = more severe relative rank).

# Date Old EPSS score New EPSS score Delta (New - Old)
1 2026-06-15 9.00% 2.47% -6.52%
2 2026-03-28 6.98% 9.00% +2.01%
3 2026-03-02 6.98%

Full EPSS history (34 records total)

Common vulnerability scoring system (CVSS) metrics for CVE-2021-38295

CVSS metrics for this CVE.

Base score Version Severity Vector Exploitability Impact Score source
7.3 3.1 HIGH
CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H Click to expand
Attack vector (AV:L)
They already need access on the box, or another person has to do something wrong; it’s not a remote drive-by.
Attack complexity (AC:L)
Once they can reach the bug, pulling it off is straightforward—no weird race conditions or rare setup.
Privileges required (PR:L)
A normal user session is enough; they don’t have to be admin.
User interaction (UI:R)
A real person has to do something—click, install, enable—otherwise it doesn’t land.
Scope (S:U)
Damage stays in the same “trust bubble” as the broken component—no big spill into unrelated systems.
Confidentiality (C:H)
Serious risk that confidential data gets exposed in a big way.
Integrity (I:H)
They could widely tamper with or forge data—trust in the data is badly hurt.
Availability (A:H)
Could take the service down hard or make it unusable for people who depend on it.
1.3 5.9 [email protected]
6.0 2.0 MEDIUM
AV:N/AC:M/Au:S/C:P/I:P/A:P Click to expand
Access vector (AV:N)
Can be exploited remotely over network reachability.
Access complexity (AC:M)
Exploitation needs some favorable conditions, but not exceptional ones.
Authentication (AU:S)
A single authentication is required.
Confidentiality impact (C:P)
Partial confidentiality impact.
Integrity impact (I:P)
Partial integrity impact.
Availability impact (A:P)
Partial availability impact.
6.8 6.4 [email protected]

Weakness enumeration for CVE-2021-38295

OS Trackers for CVE-2021-38295

vendor priority summary link
redhat medium https://access.redhat.com/security/cve/CVE-2021-38295
suse high CVE-2021-38295 severity important: SUSE including 1 source package names (couchdb), 2 product×package rows across 2 product lines (SUSE OpenStack Cloud Crowbar 8, SUSE OpenStack Cloud Crowbar 9): Known Not Affected 2. https://www.suse.com/security/cve/CVE-2021-38295/
ubuntu medium CVE-2021-38295 medium priority: Ubuntu including 1 source packages (couchdb), 9 status rows across 9 suites (focal, jammy, mantic, noble, oracular, plucky, questing, upstream, xenial): DNE 7, needs-triage 2. https://ubuntu.com/security/CVE-2021-38295

Affected software / configurations for CVE-2021-38295

Vendor Product Version Raw CPE
apache couchdb < 3.1.2 cpe:2.3:a:apache:couchdb:*:*:*:*:*:*:*:*

References for CVE-2021-38295

cvelogic Threat Intelligence