Vulnerabilities in pkg:golang/github.com/opencontainers/image-spec
PACKAGEGHSA-77vh-xpmg-72qh is a LOW (CVSS 3.0) clarify `mediatype` handling vulnerability (CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')) affecting Github.com/opencontainers/image spec libraries in the Go ecosystem. The issue involves clarify `mediatype` handling. Remediation is available by upgrading affected packages to version 1.0.2.
pkg:golang/github.com/opencontainers/image-spec
Vulnerability advisories affecting package pkg:golang/github.com/opencontainers/image-spec. Select an advisory below to view technical details or fixes.
| Advisory ID | CVE / NVD | Severity | Summary |
|---|---|---|---|
| GHSA-77vh-xpmg-72qh | - | LOW | Clarify `mediaType` handling |
GHSA-77vh-xpmg-72qh 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-77vh-xpmg-72qh
To remediate this vulnerability, upgrade all affected Github.com/opencontainers/image spec 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/opencontainers/image-spec to 1.0.2
Run the following command in your project directory to verify that all resolved dependencies use the patched release:
inspect dependencies for github.com/opencontainers/image-spec
How to Check if You Are Affected
To determine whether your application is affected by GHSA-77vh-xpmg-72qh, inspect your project dependencies for Github.com/opencontainers/image spec:
inspect dependencies for github.com/opencontainers/image-spec
Analyze the terminal output to locate any version of Github.com/opencontainers/image spec in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.0.2), 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/opencontainers/image spec, 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-77vh-xpmg-72qh Affected Github.com/opencontainers/image spec Versions
1 component(s)| Product / Package | Ecosystem | Affected Versions | Fixed Version |
|---|---|---|---|
|
github.com/opencontainers/image-spec
|
Go |
< 1.0.2
|
1.0.2
|
References
Frequently Asked Questions
What is GHSA-77vh-xpmg-72qh?
Which Github.com/opencontainers/image spec versions are affected?
What version fixes GHSA-77vh-xpmg-72qh?
Is github.com/opencontainers/image-spec affected?
What is the CVSS score of GHSA-77vh-xpmg-72qh?
What CWE is associated with GHSA-77vh-xpmg-72qh?
How can I check Go dependencies for GHSA-77vh-xpmg-72qh?
Machine-readable OSV JSON
OSV v1.5 Schema
{
"schema_version" : "1.4.0",
"id" : "GHSA-77vh-xpmg-72qh",
"modified" : "2021-11-24T19:43:35Z",
"published" : "2021-11-18T16:02:41Z",
"aliases" : [ ],
"summary" : "Clarify `mediaType` handling",
"details" : "### Impact\nIn the OCI Image Specification version 1.0.1 and prior, manifest and index documents are not self-describing and documents with a single digest could be interpreted as either a manifest or an index.\n\n### Patches\nThe Image Specification will be updated to recommend that both manifest and index documents contain a `mediaType` field to identify the type of document.\nRelease [v1.0.2](https://github.com/opencontainers/image-spec/releases/tag/v1.0.2) includes these updates.\n\n### Workarounds\nSoftware attempting to deserialize an ambiguous document may reject the document if it contains both “manifests” and “layers” fields or “manifests” and “config” fields.\n\n### References\nhttps://github.com/opencontainers/distribution-spec/security/advisories/GHSA-mc8v-mgrf-8f4m\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in https://github.com/opencontainers/image-spec\n* Email us at [security@opencontainers.org](mailto:security@opencontainers.org)\n* https://github.com/opencontainers/image-spec/commits/v1.0.2\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/opencontainers/image-spec"
},
"ranges" : [ {
"type" : "ECOSYSTEM",
"events" : [ {
"introduced" : "0"
}, {
"fixed" : "1.0.2"
} ]
} ]
} ],
"references" : [ {
"type" : "WEB",
"url" : "https://github.com/opencontainers/distribution-spec/security/advisories/GHSA-mc8v-mgrf-8f4m"
}, {
"type" : "WEB",
"url" : "https://github.com/opencontainers/image-spec/security/advisories/GHSA-77vh-xpmg-72qh"
}, {
"type" : "WEB",
"url" : "https://github.com/opencontainers/image-spec/commit/693428a734f5bab1a84bd2f990d92ef1111cd60c"
}, {
"type" : "PACKAGE",
"url" : "https://github.com/opencontainers/image-spec"
}, {
"type" : "WEB",
"url" : "https://github.com/opencontainers/image-spec/releases/tag/v1.0.2"
} ],
"database_specific" : {
"cwe_ids" : [ "CWE-843" ],
"severity" : "LOW",
"github_reviewed" : true,
"github_reviewed_at" : "2021-11-17T23:13:41Z",
"nvd_published_at" : null
}
}