# CVE-2018-12608: Docker Authentication Bypass

> Docker Engine incorrectly validated client TLS certificates against system roots, allowing unauthorized clients to authenticate.

- **Severity:** High 7.5 (`CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:H/A:N`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 10 Sep 2018
- **Updated:** 5 Aug 2024
- **Also known as:** DEBIAN-CVE-2018-12608, GHSA-qrqr-3x5j-2xw9, UBUNTU-CVE-2018-12608

## What is CVE-2018-12608?

CVE-2018-12608 is a high-severity authentication bypass vulnerability in n/a, published on 10 Sep 2018. An attacker can exploit it over the internet without logging in, with no action from the victim.

### Official description

An issue was discovered in Docker Moby before 17.06.0. The Docker engine validated a client TLS certificate using both the configured client CA root certificate and all system roots on non-Windows systems. This allowed a client with any domain validated certificate signed by a system-trusted root CA (as opposed to one signed by the configured CA root certificate) to authenticate.

Weakness: CWE-295 (Improper Certificate Validation)

## Which versions are affected by CVE-2018-12608?

2 open source packages ship an affected version, including github.com/docker/docker. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/docker/docker` | Go | All versions | 17.06.0-ce |
| `github.com/docker/docker` | Go | All versions | 17.06.0-ce |

Products: Mobyproject Moby.

## How do I fix CVE-2018-12608?

Upgrade github.com/docker/docker to 17.06.0-ce or later.

## Is CVE-2018-12608 being exploited?

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

## Other vulnerabilities in n/a

- [CVE-2024-36623](https://insights.sbomify.com/CVE-2024-36623/): Moby Race Condition vulnerability (high 8.1)
- [CVE-2023-28840](https://insights.sbomify.com/CVE-2023-28840/): moby/moby's dockerd daemon encrypted overlay network may be unauthenticated (high 7.5)
- [CVE-2024-24557](https://insights.sbomify.com/CVE-2024-24557/): Moby classic builder cache poisoning (medium 6.9)
- [CVE-2023-28841](https://insights.sbomify.com/CVE-2023-28841/): moby/moby's dockerd daemon encrypted overlay network traffic may be unencrypted (medium 6.8)
- [CVE-2023-28842](https://insights.sbomify.com/CVE-2023-28842/): moby/moby's dockerd daemon encrypted overlay network with a single endpoint is unauthenticated (medium 6.8)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2018-12608 and fix it if it is affected.

What it is: CVE-2018-12608 is a high-severity authentication bypass vulnerability in n/a, published on 10 Sep 2018. 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-2018-12608 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/docker/docker (Go): affected all versions; fixed in 17.06.0-ce
- github.com/docker/docker (Go): affected all versions; fixed in 17.06.0-ce

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

## Sources

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

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