# CVE-2021-41092: Docker CLI leaks private registry credentials to registry-1.docker.io

> Docker CLI leaks private registry credentials to Docker Hub when credential helpers are misconfigured, exposing sensitive authentication data.

- **Severity:** Medium 5.4 (`CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:C/C:H/I:N/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** An administrator
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 4 Oct 2021
- **Updated:** 4 Aug 2024
- **Also known as:** BIT-docker-cli-2021-41092, CLEANSTART-2026-SS82988, DEBIAN-CVE-2021-41092, GHSA-99pg-grm5-qq3v, GO-2024-2912, UBUNTU-CVE-2021-41092, USN-5134-1, openSUSE-SU-2024:11566-1

## What is CVE-2021-41092?

CVE-2021-41092 is a medium-severity vulnerability in Fedoraproject Fedora, published on 4 Oct 2021. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.

### Official description

Docker CLI is the command line interface for the docker container runtime. A bug was found in the Docker CLI where running `docker login my-private-registry.example.com` with a misconfigured configuration file (typically `~/.docker/config.json`) listing a `credsStore` or `credHelpers` that could not be executed would result in any provided credentials being sent to `registry-1.docker.io` rather than the intended private registry. This bug has been fixed in Docker CLI 20.10.9. Users should update to this version as soon as possible. For users unable to update ensure that any configured credsStore or credHelpers entries in the configuration file reference an installed credential helper that is executable and on the PATH.

Weakness: CWE-522 (Insufficiently Protected Credentials), CWE-200 (Exposure of Sensitive Information to an Unauthorized Actor)

## Which versions are affected by CVE-2021-41092?

4 open source packages ship an affected version, including github.com/docker/cli and docker-cli. It affects 2 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/docker/cli` | Go | All versions | 20.10.9 |
| `github.com/docker/cli` | Go | All versions | 20.10.9 |
| `github.com/docker/cli` | Go | All versions | 20.10.9+incompatible |
| `docker-cli` | Bitnami | All versions | 20.10.9 |
| `docker` | openSUSE:Tumbleweed | All versions | 20.10.9_ce-1.1 |

Products: Docker Command Line Interface, Fedoraproject Fedora.

## How do I fix CVE-2021-41092?

Upgrade github.com/docker/cli to a fixed version for your release line: 20.10.9 or 20.10.9+incompatible.

## Is CVE-2021-41092 being exploited?

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

## Other vulnerabilities in Fedoraproject Fedora

- [CVE-2025-15558](https://insights.sbomify.com/CVE-2025-15558/): Docker Desktop Docker Plugins Uncontrolled Search Path Element Local Privilege Escalation Vulnerability (high 7.0)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2021-41092 and fix it if it is affected.

What it is: CVE-2021-41092 is a medium-severity vulnerability in Fedoraproject Fedora, published on 4 Oct 2021. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2021-41092 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/docker/cli (Go): affected all versions; fixed in 20.10.9
- github.com/docker/cli (Go): affected all versions; fixed in 20.10.9
- github.com/docker/cli (Go): affected all versions; fixed in 20.10.9+incompatible
- docker-cli (Bitnami): affected all versions; fixed in 20.10.9

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

## Sources

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

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