Distribution: Client `manifests.Get()` does not verify returned content against requested digest
### Summary `registry/client.(*manifests).Get(ctx, dgst, …)` fetches a manifest by digest but never hashes the returned body and compares it against the requested digest. A malicious or compromised registry, or any MITM on the registry connection, can serve arbitrary manifest bytes in response to a digest-pinned request and the client returns the substituted content transparently to the caller. Any application relying on digest pinning for supply-chain integrity — image policy controllers, mirrors, pull-through caches — is silently undermined. The bundled pull-through proxy (`registry/proxy/proxymanifeststore.go`) is itself an unguarded consumer and is directly exploitable. ### Details **Root cause:** `registry/client/repository.go:488-505` reads the response body and passes it directly to `distribution.UnmarshalManifest` without ever computing `digest.FromBytes(body)` and comparing against the caller-supplied `dgst`. The `Docker-Content-Digest` response header is parsed (lines 251-292 in `descriptorFromResponse`) only to populate an out-parameter (`ReturnContentDigest`) and is itself server-supplied — it is never recomputed from the body, so a lying server can set it to whatever value the caller requested while delivering different bytes. **Attack path:** An attacker who controls the registry endpoint (malicious registry, compromised upstream, DNS hijack, or TLS MITM) responds to `GET /v2/{name}/manifests/{digest}` with: 1. `Docker-Content-Digest: ` (forged header) 2. A body
- Products
- github.com/distribution/distribution/v3, github.com/docker/distribution
- Affected versions
- Not specified
- Fixed versions
- 3.1.2
- CVEs
- CVE-2026-85747
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 31 Oct 2026, 09:36 UTC · Revision 1
Source evidence
Distribution: Client `manifests.Get()` does not verify returned content against requested digest
core-osv · Original sourcePublished 15 Oct 2026, 20:22 UTC
### Summary `registry/client.(*manifests).Get(ctx, dgst, …)` fetches a manifest by digest but never hashes the returned body and compares it against the requested digest. A malicious or compromised registry, or any MITM on the registry connection, can serve arbitrary manifest bytes in response to a digest-pinned request and the client returns the substituted content transparently to the caller. Any application relying on digest pinning for supply-chain integrity — image policy controllers, mirrors, pull-through caches — is silently undermined. The bundled pull-through proxy (`registry/proxy/proxymanifeststore.go`) is itself an unguarded consumer and is directly exploitable. ### Details **Root cause:** `registry/client/repository.go:488-505` reads the response body and passes it directly to `distribution.UnmarshalManifest` without ever computing `digest.FromBytes(body)` and comparing against the caller-supplied `dgst`. The `Docker-Content-Digest` response header is parsed (lines 251-292 in `descriptorFromResponse`) only to populate an out-parameter (`ReturnContentDigest`) and is itself server-supplied — it is never recomputed from the body, so a lying server can set it to whatever value the caller requested while delivering different bytes. **Attack path:** An attacker who controls the registry endpoint (malicious registry, compromised upstream, DNS hijack, or TLS MITM) responds to `GET /v2/{name}/manifests/{digest}` with: 1. `Docker-Content-Digest: ` (forged header) 2. A body
osv:GHSA-685w-q87j-wqw3
github.com/docker/distribution
Fixed versions: Not specified
github.com/distribution/distribution/v3
Fixed versions: 3.1.2
Complete source record
{
"id": "8f3b663eae8d3dce43d46430dd016f0cc49fe07194fdb1e90066662a49414676",
"url": "https://osv.dev/vulnerability/GHSA-685w-q87j-wqw3",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "Distribution: Client `manifests.Get()` does not verify returned content against requested digest",
"summary": "### Summary `registry/client.(*manifests).Get(ctx, dgst, …)` fetches a manifest by digest but never hashes the returned body and compares it against the requested digest. A malicious or compromised registry, or any MITM on the registry connection, can serve arbitrary manifest bytes in response to a digest-pinned request and the client returns the substituted content transparently to the caller. Any application relying on digest pinning for supply-chain integrity — image policy controllers, mirrors, pull-through caches — is silently undermined. The bundled pull-through proxy (`registry/proxy/proxymanifeststore.go`) is itself an unguarded consumer and is directly exploitable. ### Details **Root cause:** `registry/client/repository.go:488-505` reads the response body and passes it directly to `distribution.UnmarshalManifest` without ever computing `digest.FromBytes(body)` and comparing against the caller-supplied `dgst`. The `Docker-Content-Digest` response header is parsed (lines 251-292 in `descriptorFromResponse`) only to populate an out-parameter (`ReturnContentDigest`) and is itself server-supplied — it is never recomputed from the body, so a lying server can set it to whatever value the caller requested while delivering different bytes. **Attack path:** An attacker who controls the registry endpoint (malicious registry, compromised upstream, DNS hijack, or TLS MITM) responds to `GET /v2/{name}/manifests/{digest}` with: 1. `Docker-Content-Digest: ` (forged header) 2. A body",
"evidence": "osv:GHSA-685w-q87j-wqw3",
"products": [
{
"name": {
"value": "github.com/docker/distribution",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": []
},
{
"name": {
"value": "github.com/distribution/distribution/v3",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [
{
"value": "3.1.2",
"evidence": "/affected/1/ranges"
}
],
"affected_versions": []
}
],
"severity": "medium",
"structured": {
"id": "GHSA-685w-q87j-wqw3",
"aliases": [
"BIT-distribution-2026-85747",
"CVE-2026-85747",
"GHSA-685w-q87j-wqw3"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:C/C:N/I:H/A:N"
}
],
"affected": [
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"last_affected": "2.8.3"
}
]
}
],
"package": {
"name": "github.com/docker/distribution",
"purl": "pkg:golang/github.com/docker/distribution",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-685w-q87j-wqw3/GHSA-685w-q87j-wqw3.json"
}
},
{
"ranges": [
{
"type": "SEMVER",
"events": [
{
"introduced": "0"
},
{
"fixed": "3.1.2"
}
]
}
],
"package": {
"name": "github.com/distribution/distribution/v3",
"purl": "pkg:golang/github.com/distribution/distribution/v3",
"ecosystem": "Go"
},
"database_specific": {
"source": "https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2026/10/GHSA-685w-q87j-wqw3/GHSA-685w-q87j-wqw3.json"
}
}
],
"modified": "2026-10-20T10:41:04.049860645Z",
"provider": "osv",
"references": [
"https://github.com/distribution/distribution/security/advisories/GHSA-685w-q87j-wqw3",
"https://nvd.nist.gov/vuln/detail/CVE-2026-85747",
"https://github.com/distribution/distribution/commit/8f91c26c8888a95a36c2357a6e30bc15d4dd76d3",
"https://github.com/distribution/distribution/commit/960439b09f342cdeb8f1c0e18e8c7349bdcfbf80",
"https://github.com/distribution/distribution",
"https://github.com/distribution/distribution/releases/tag/v3.1.2"
],
"provider_metadata": {
"cwe_ids": [
"CWE-354"
],
"severity": "MODERATE",
"github_reviewed": true,
"nvd_published_at": "2026-10-13T19:21:02Z",
"github_reviewed_at": "2026-10-15T20:22:02Z"
}
},
"related_cves": [
{
"value": "CVE-2026-85747",
"evidence": "/aliases"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 379196,
"published_at": "2026-10-15T20:22:02+00:00"
}