Skip to content
OpenAdvisories
Unscored Public exploit CVE-2021-38295 EUVD-2021-24752GHSA-gr7p-9mx8-wr74

Privilege escalation vulnerability when using HTML attachments

Published Oct 14, 2021 · Updated Aug 4, 2024 · 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

Affected products

VendorProductAffectedFixed
Apache Software Foundation Apache CouchDB Apache CouchDB – < 3.1.2 3.1.2
Apache Software Foundation IBM Cloudant IBM Cloudant – < 8201 8201

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Ubuntu 16.04 LTS couchdb No fix yet —

Public exploits

Exploit or proof-of-concept code for this vulnerability is publicly available, which lowers the bar for attackers. Treat it as a reason to patch sooner.

Third-party code, not reviewed by us. Public PoCs are sometimes fake or contain malware. Read the code first and run it only in an isolated lab, against systems you are authorised to test.

GitHub 1 repository

Sources: PoC-in-GitHub, Metasploit Framework, Exploit-DB — updated daily. Only links are listed; no exploit code is hosted here.

References