# CVE-2020-8920: Overoptimization leads to private information leak in Gerrit

> An overoptimization bug in Gerrit skips access checks, allowing attackers to read private user account information.

- **Severity:** Low 3.5 (`CVSS:3.1/AV:A/AC:L/PR:L/UI:N/S:U/C:L/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Local or same network only
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 10 Dec 2020
- **Updated:** 4 Aug 2024
- **Also known as:** GHSA-g5q2-cxgq-h2rw

## What is CVE-2020-8920?

CVE-2020-8920 is a low-severity missing authorization vulnerability in Gerrit, published on 10 Dec 2020. It can only be exploited from the same machine or local network, with no action from the victim.

### Official description

An information leak vulnerability exists in Gerrit versions prior to 2.14.22, 2.15.21, 2.16.25, 3.0.15, 3.1.10, 3.2.5 where an overoptimization with the FilteredRepository wrapper skips the verification of access on All-Users repositories, allowing an attacker to get read access to all users' personal information associated with their accounts.

Weakness: CWE-285 (Improper Authorization)

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

12 open source packages ship an affected version, including com.google.gerrit:gerrit-plugin-api. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `com.google.gerrit:gerrit-plugin-api` | Maven | All versions | 2.14.22 |
| `com.google.gerrit:gerrit-plugin-api` | Maven | All versions | 2.14.22 |
| `com.google.gerrit:gerrit-plugin-api` | Maven | From 2.15.0 | 2.15.21 |
| `com.google.gerrit:gerrit-plugin-api` | Maven | From 2.15.0 | 2.15.21 |
| `com.google.gerrit:gerrit-plugin-api` | Maven | From 2.16.0 | 2.16.25 |
| `com.google.gerrit:gerrit-plugin-api` | Maven | From 2.16.0 | 2.16.25 |
| `com.google.gerrit:gerrit-plugin-api` | Maven | From 3.0.0 | 3.0.15 |
| `com.google.gerrit:gerrit-plugin-api` | Maven | From 3.0.0 | 3.0.15 |
| `com.google.gerrit:gerrit-plugin-api` | Maven | From 3.1.0 | 3.1.10 |
| `com.google.gerrit:gerrit-plugin-api` | Maven | From 3.1.0 | 3.1.10 |
| `com.google.gerrit:gerrit-plugin-api` | Maven | From 3.2.0 | 3.2.5 |
| `com.google.gerrit:gerrit-plugin-api` | Maven | From 3.2.0 | 3.2.5 |

Products: Google Gerrit.

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

Upgrade com.google.gerrit:gerrit-plugin-api to a fixed version for your release line: 2.14.22, 2.15.21, 2.16.25 or 3.0.15.

## Is CVE-2020-8920 being exploited?

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

## Other vulnerabilities in Gerrit

- [CVE-2021-22553](https://insights.sbomify.com/CVE-2021-22553/): Heap Memory exhaustion in Gerrit (medium 6.5)
- [CVE-2026-2725](https://insights.sbomify.com/CVE-2026-2725/): Improper Authorization in Gerrit allowing Code Review Bypass via "Submitted Together" (medium 6.0)
- [CVE-2020-8919](https://insights.sbomify.com/CVE-2020-8919/): Information leakage in Gerrit (low 3.5)

## Fix prompt for AI coding agents

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

What it is: CVE-2020-8920 is a low-severity missing authorization vulnerability in Gerrit, published on 10 Dec 2020. It can only be exploited from the same machine or local network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2020-8920 in the wild and no public exploit code.

Affected packages and fixed versions:
- com.google.gerrit:gerrit-plugin-api (Maven): affected all versions; fixed in 2.14.22
- com.google.gerrit:gerrit-plugin-api (Maven): affected all versions; fixed in 2.14.22
- com.google.gerrit:gerrit-plugin-api (Maven): affected from 2.15.0; fixed in 2.15.21
- com.google.gerrit:gerrit-plugin-api (Maven): affected from 2.15.0; fixed in 2.15.21
- com.google.gerrit:gerrit-plugin-api (Maven): affected from 2.16.0; fixed in 2.16.25
- com.google.gerrit:gerrit-plugin-api (Maven): affected from 2.16.0; fixed in 2.16.25
- com.google.gerrit:gerrit-plugin-api (Maven): affected from 3.0.0; fixed in 3.0.15
- com.google.gerrit:gerrit-plugin-api (Maven): affected from 3.0.0; fixed in 3.0.15
- com.google.gerrit:gerrit-plugin-api (Maven): affected from 3.1.0; fixed in 3.1.10
- com.google.gerrit:gerrit-plugin-api (Maven): affected from 3.1.0; fixed in 3.1.10
- com.google.gerrit:gerrit-plugin-api (Maven): affected from 3.2.0; fixed in 3.2.5
- com.google.gerrit:gerrit-plugin-api (Maven): affected from 3.2.0; fixed in 3.2.5

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-8920/ (Markdown: https://insights.sbomify.com/CVE-2020-8920/index.md)
```

## Sources

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

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