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

Published Oct 14, 2021
·
Updated

Apache CouchDB could allow a remote attacker to gain elevated privileges on the system, caused by improper input validation. By persuading a victim to open specially-crafted content, an authenticated attacker could exploit this vulnerability to gain elevated privileges to add or remove data in any database or make configuration changes.

Other sources

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 Software

3 affected components
Apache CouchDB<3.1.2
IBM Planning Analytics Local - IBM Planning Analytics Workspace<=2.1
IBM Planning Analytics Local - IBM Planning Analytics Workspace<=2.0

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade Apache CouchDB to a version that resolves this vulnerability.

    Fixed in 3.1.2
  2. Compensating control

    Avoid having a CouchDB admin open/preview HTML attachments in a browser (e.g., via the CouchDB admin interface Fauxton), since any JavaScript embedded in the HTML attachment can execute in the admin’s security context.

Event History

Oct 14, 2021
CVE Published
via MITRE·07:55 PM
Data Sourced
via MITRE·07:55 PM
DescriptionWeakness
Data Sourced
via NVD·08:15 PM
DescriptionSeverityWeaknessAffected Software

Parent advisories

This vulnerability appears in the following advisories.

Free Weekly Intel

Don't miss critical vulnerabilities

Join thousands of security professionals who receive our weekly digest of trending CVEs, zero-days, and exploited vulnerabilities.

No spam. Unsubscribe anytime.

Frequently Asked Questions

1

What is CVE-2021-38295?

CVE-2021-38295 is a vulnerability in Apache CouchDB that allows a malicious user to execute JavaScript code by attaching a specially crafted HTML document to a database.

2

What is the severity of CVE-2021-38295?

The severity of CVE-2021-38295 is high, with a CVSS score of 7.3.

3

Which software is affected by CVE-2021-38295?

Apache CouchDB versions up to and excluding 3.1.2 are affected by CVE-2021-38295.

4

How does CVE-2021-38295 exploit work?

A malicious user with permission to create documents in a database can attach an HTML document containing JavaScript code. When a CouchDB admin opens this attachment, the embedded JavaScript code gets executed.

5

How can I fix CVE-2021-38295?

To fix CVE-2021-38295, update Apache CouchDB to version 3.1.2 or higher.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203