GHSA-qq97-vm5h-rrhg: Github.com/docker/distribution OCI Manifest Type Confusion Issue Vulnerability
LOWGHSA-qq97-vm5h-rrhg is a LOW (CVSS 3.0) oci manifest type confusion issue vulnerability (CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')) affecting Github.com/docker/distribution libraries in the Go ecosystem. The issue involves oci manifest type confusion issue. Remediation is available by upgrading affected packages to version 2.8.0.
GHSA-qq97-vm5h-rrhg at a Glance
Security Impact
CVSS: 3.0
The security impact metrics below are parsed directly from the CVSS v3.1 vector string (CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:L/A:N).
How to Fix GHSA-qq97-vm5h-rrhg
To remediate this vulnerability, upgrade all affected Github.com/docker/distribution dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.
Upgrade github.com/docker/distribution to 2.8.0
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/docker/distribution
How to Check if You Are Affected
To determine whether your application is affected by GHSA-qq97-vm5h-rrhg, inspect your project dependencies for Github.com/docker/distribution:
inspect dependencies for github.com/docker/distribution
Analyze the terminal output to locate any version of Github.com/docker/distribution in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 2.8.0), your application is affected.
Note: Verify declared build manifests and deployed runtime container environments.
Technical Details
Vulnerability Mechanism & Technical Analysis
This vulnerability is classified under CWE-843: Access of Resource Using Incompatible Type ('Type Confusion'), where the product allocates or initializes a resource such as a pointer, object, or variable using one type, but it later accesses that resource using a type that is incompatible with the original type. In Github.com/docker/distribution, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.
Source Advisory Statement
GHSA-qq97-vm5h-rrhg Affected Github.com/docker/distribution Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/docker/distribution
|
Go |
< 2.8.0
|
2.8.0
|
References
Frequently Asked Questions
What is GHSA-qq97-vm5h-rrhg?
Which Github.com/docker/distribution versions are affected?
What version fixes GHSA-qq97-vm5h-rrhg?
Is github.com/docker/distribution affected?
What is the CVSS score of GHSA-qq97-vm5h-rrhg?
What CWE is associated with GHSA-qq97-vm5h-rrhg?
How can I check Go dependencies for GHSA-qq97-vm5h-rrhg?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-qq97-vm5h-rrhg",
"modified" : "2023-02-09T15:29:32Z",
"published" : "2022-02-08T18:53:56Z",
"aliases" : [ ],
"summary" : "OCI Manifest Type Confusion Issue",
"details" : "### 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",
"severity" : [ {
"type" : "CVSS_V3",
"score" : "CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:L/A:N"
} ],
"affected" : [ {
"package" : {
"ecosystem" : "Go",
"name" : "github.com/docker/distribution"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "2.8.0"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/distribution/distribution/security/advisories/GHSA-qq97-vm5h-rrhg"
}, {
"type" : "WEB",
"url" : "https://github.com/opencontainers/image-spec/pull/411"
}, {
"type" : "WEB",
"url" : "https://github.com/distribution/distribution/commit/b59a6f827947f9e0e67df0cfb571046de4733586"
}, {
"type" : "WEB",
"url" : "https://github.com/distribution/distribution"
}, {
"type" : "WEB",
"url" : "https://pkg.go.dev/vuln/GO-2022-0379"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-843" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2022-02-08T18:53:56Z",
"nvd_published_at" : null
}
}