GHSA-qq97-vm5h-rrhg json
OCI Manifest Type Confusion Issue
published 4y ago modified 3mo ago also GO-2022-0379
- cvss
- 3.0
- version 3.1, GitHub
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- —
- no score, EPSS covers CVEs only
- public exploits
- 0
- none known
Summary
### Impact
Systems that rely on digest equivalence for image attestations may be vulnerable to type confusion.
### Patches
Upgrade 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).
### Workarounds
There is no way to work around this issue without patching.
### References
Due 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.
### For more information
If you have any questions or comments about this advisory: * Open an issue in [distribution](https://github.com/distribution/distribution) * Open an issue in [distribution-spec](https://github.com/opencontainers/distribution-spec) * Email us at [cncf-distribution-security@lists.cncf.io](mailto:cncf-distribution-security@lists.cncf.io)
Patch / fix
- go github.com/docker/distribution 2.8.0, 2.8.0+incompatible
- github.com/distribution/distribution@b59a6f8 commit
- github.com/opencontainers/image-spec#411 pull request
Is GHSA-qq97-vm5h-rrhg in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.
Check with FencerCVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| GitHub | 3.1 | 3.0 | CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:L/A:N |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | github.com/docker/distribution | <2.8.0 <2.8.0+incompatible |
2.8.0 2.8.0+incompatible |
Classification
- Weakness
-
- CWE-843 Access of Resource Using Incompatible Type
References
-
github.com
/opencontainers/image-spec/pull/411
web
-
github.com
/distribution/distribution/commit/b59a6f827947f9e0e67df0cfb571046de4733586
web, patch
-
github.com
/distribution/distribution/security/advisories/GHSA-qq97-vm5h-rrhg
web
-
github.com
/distribution/distribution
web
-
pkg.go.dev
/vuln/GO-2022-0379
web
Sources
- GitHub Advisory GHSA-qq97-vm5h-rrhg
- OSV GO-2022-0379
Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.