{"id":"GHSA-qq97-vm5h-rrhg","aliases":["GO-2022-0379"],"status":"published","title":"OCI Manifest Type Confusion Issue","description":"### Impact\n\nSystems that rely on digest equivalence for image attestations may be vulnerable to type confusion.\n\n### Patches\n\nUpgrade to at least `v2.8.0-beta.1`  if you are running `v2.x` release. If you use the code from the `main` branch, update at least to the commit after [b59a6f827947f9e0e67df0cfb571046de4733586](https://github.com/distribution/distribution/commit/b59a6f827947f9e0e67df0cfb571046de4733586).\n\n### Workarounds\n\nThere is no way to work around this issue without patching.\n\n### References\n\nDue to [an oversight in the OCI Image Specification](https://github.com/opencontainers/image-spec/pull/411) that removed the embedded `mediaType` field from manifests, a maliciously crafted OCI Container Image can cause registry clients to parse the same image in two different ways without modifying the image’s digest by modifying the `Content-Type` header returned by a registry. This can invalidate a common pattern of relying on container image digests for equivalence.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [distribution](https://github.com/distribution/distribution) \n* Open an issue in [distribution-spec](https://github.com/opencontainers/distribution-spec) \n* Email us at [cncf-distribution-security@lists.cncf.io](mailto:cncf-distribution-security@lists.cncf.io)","severity":{"version":"3.1","score":3,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:L/A:N","level":"low","from":"ghsa"},"facts":{"in_kev":false,"known_exploited":false,"public_exploit":false,"fix_available":true},"cwes":["CWE-843"],"published":"2022-02-08T18:53:56Z","modified":"2026-08-07T08:12:31Z","fixes":[{"ecosystem":"Go","package":"github.com/docker/distribution","fixed_in":["2.8.0","2.8.0+incompatible"],"sources":["ghsa","osv"]}],"affected":[{"source":"ghsa","ecosystem":"Go","package":"github.com/docker/distribution","ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"0"},{"fixed":"2.8.0"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/docker/distribution","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.8.0"}]}]},{"source":"osv","ecosystem":"Go","package":"github.com/docker/distribution","ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"2.8.0+incompatible"}]}]}],"references":[{"url":"https://github.com/distribution/distribution/security/advisories/GHSA-qq97-vm5h-rrhg","tags":["web"]},{"url":"https://github.com/opencontainers/image-spec/pull/411","tags":["web"]},{"url":"https://github.com/distribution/distribution/commit/b59a6f827947f9e0e67df0cfb571046de4733586","tags":["web","fix"]},{"url":"https://pkg.go.dev/vuln/GO-2022-0379","tags":["web"]},{"url":"https://github.com/advisories/GHSA-qq97-vm5h-rrhg"},{"url":"https://github.com/distribution/distribution","tags":["web"]}],"sources":{"ghsa":[{"id":"GHSA-qq97-vm5h-rrhg","title":"OCI Manifest Type Confusion Issue","description":"### Impact\n\nSystems that rely on digest equivalence for image attestations may be vulnerable to type confusion.\n\n### Patches\n\nUpgrade to at least `v2.8.0-beta.1`  if you are running `v2.x` release. If you use the code from the `main` branch, update at least to the commit after [b59a6f827947f9e0e67df0cfb571046de4733586](https://github.com/distribution/distribution/commit/b59a6f827947f9e0e67df0cfb571046de4733586).\n\n### Workarounds\n\nThere is no way to work around this issue without patching.\n\n### References\n\nDue to [an oversight in the OCI Image Specification](https://github.com/opencontainers/image-spec/pull/411) that removed the embedded `mediaType` field from manifests, a maliciously crafted OCI Container Image can cause registry clients to parse the same image in two different ways without modifying the image’s digest by modifying the `Content-Type` header returned by a registry. This can invalidate a common pattern of relying on container image digests for equivalence.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [distribution](https://github.com/distribution/distribution) \n* Open an issue in [distribution-spec](https://github.com/opencontainers/distribution-spec) \n* Email us at [cncf-distribution-security@lists.cncf.io](mailto:cncf-distribution-security@lists.cncf.io)\n","status":"published","published":"2022-02-08T18:53:56Z","modified":"2023-02-09T15:29:32Z","cvss":[{"version":"3.1","score":3,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:L/A:N","level":"low"}],"cwes":["CWE-843"],"updated_at":"2026-11-02T14:36:44.81167Z"}],"osv":[{"id":"GHSA-qq97-vm5h-rrhg","title":"OCI Manifest Type Confusion Issue","description":"### Impact\n\nSystems that rely on digest equivalence for image attestations may be vulnerable to type confusion.\n\n### Patches\n\nUpgrade to at least `v2.8.0-beta.1`  if you are running `v2.x` release. If you use the code from the `main` branch, update at least to the commit after [b59a6f827947f9e0e67df0cfb571046de4733586](https://github.com/distribution/distribution/commit/b59a6f827947f9e0e67df0cfb571046de4733586).\n\n### Workarounds\n\nThere is no way to work around this issue without patching.\n\n### References\n\nDue to [an oversight in the OCI Image Specification](https://github.com/opencontainers/image-spec/pull/411) that removed the embedded `mediaType` field from manifests, a maliciously crafted OCI Container Image can cause registry clients to parse the same image in two different ways without modifying the image’s digest by modifying the `Content-Type` header returned by a registry. This can invalidate a common pattern of relying on container image digests for equivalence.\n\n### For more information\n\nIf you have any questions or comments about this advisory:\n* Open an issue in [distribution](https://github.com/distribution/distribution) \n* Open an issue in [distribution-spec](https://github.com/opencontainers/distribution-spec) \n* Email us at [cncf-distribution-security@lists.cncf.io](mailto:cncf-distribution-security@lists.cncf.io)\n","status":"published","published":"2022-02-08T18:53:56Z","modified":"2026-08-07T08:12:31.384046104Z","cvss":[{"version":"3.1","score":3,"vector":"CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:L/A:N","level":"low"}],"cwes":["CWE-843"],"updated_at":"2026-11-02T15:46:54.760124Z"},{"id":"GO-2022-0379","title":"Type confusion in github.com/docker/distribution","description":"Systems that rely on digest equivalence for image attestations may be vulnerable to type confusion.\n\nA maliciously crafted OCI Container Image can cause registry clients to parse the same image in two different ways without modifying the image's digest, invalidating the common pattern of relying on container image digests for equivalence.\n\nThis problem has been addressed in newer versions by improving validation in manifest unmarshalling.","status":"published","published":"2022-07-29T20:00:03Z","modified":"2026-08-07T08:12:28.619579656Z","updated_at":"2026-11-02T15:47:00.918515Z"}]}}
