# CVE-2020-1955: Auth bypass in Apache CouchDB

> An authentication bypass in Apache CouchDB allows unauthenticated access to all endpoints when a specific non-default configuration is enabled.

- **Severity:** Critical 9.8 (`CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 20 May 2020
- **Updated:** 4 Aug 2024
- **Also known as:** BIT-couchdb-2020-1955, GHSA-6625-2573-pv96

## What is CVE-2020-1955?

CVE-2020-1955 is a critical authentication bypass vulnerability in Apache CouchDB, published on 20 May 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

CouchDB version 3.0.0 shipped with a new configuration setting that governs access control to the entire database server called `require_valid_user_except_for_up`. It was meant as an extension to the long standing setting `require_valid_user`, which in turn requires that any and all requests to CouchDB will have to be made with valid credentials, effectively forbidding any anonymous requests. The new `require_valid_user_except_for_up` is an off-by-default setting that was meant to allow requiring valid credentials for all endpoints except for the `/_up` endpoint. However, the implementation of this made an error that lead to not enforcing credentials on any endpoint, when enabled. CouchDB versions 3.0.1[1] and 3.1.0[2] fix this issue.

Weakness: CWE-306 (Missing Authentication for Critical Functionality)

## Which versions are affected by CVE-2020-1955?

1 open source package ship an affected version, including couchdb. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `couchdb` | Bitnami | From 3.0.0 | 3.0.1 |

Products: Apache Couchdb.

## How do I fix CVE-2020-1955?

Upgrade couchdb to 3.0.1 or later.

## Is CVE-2020-1955 being exploited?

There is no known exploitation of CVE-2020-1955 in the wild and no public exploit code.

## Other vulnerabilities in Apache CouchDB

- [CVE-2022-24706](https://insights.sbomify.com/CVE-2022-24706/): Apache CouchDB Insecure Default Initialization of Resource (critical 9.8, exploited in the wild)
- [CVE-2017-12635](https://insights.sbomify.com/CVE-2017-12635/): Privilege escalation in Apache CouchDB (critical 9.8)
- [CVE-2018-14889](https://insights.sbomify.com/CVE-2018-14889/): Code injection in n/a (high 7.8)
- [CVE-2016-8742](https://insights.sbomify.com/CVE-2016-8742/): Privilege escalation in Apache CouchDB (high 7.8)
- [CVE-2021-38295](https://insights.sbomify.com/CVE-2021-38295/): Privilege escalation vulnerability when using HTML attachments (high 7.3)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2020-1955 and fix it if it is affected.

What it is: CVE-2020-1955 is a critical authentication bypass vulnerability in Apache CouchDB, published on 20 May 2020. An attacker can exploit it over the internet without logging in, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2020-1955 in the wild and no public exploit code.

Affected packages and fixed versions:
- couchdb (Bitnami): affected from 3.0.0; fixed in 3.0.1

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2020-1955/ (Markdown: https://insights.sbomify.com/CVE-2020-1955/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2020-1955
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2020-1955
- OSV: https://osv.dev/vulnerability/CVE-2020-1955

---
From sbomify Insights: https://insights.sbomify.com/CVE-2020-1955/
Summaries are generated and may contain mistakes; the official description above is the record.
