Vulnerabilities in pkg:golang/github.com/opencontainers/image-spec

PACKAGE
Advisory Summary

GHSA-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.

1 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/opencontainers/image-spec

1 Known Advisory Record(s)

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

CVE Identifier N/A
GHSA Identifier GHSA-77vh-xpmg-72qh
Severity LOW
CVSS v3.1 Base Score 3.0
CWE Classification CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')
Affected Product Github.com/opencontainers/image spec
Package Ecosystem Go
Published Date
Last Updated

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).

Attack Vector Network (AV:N)
Attack Complexity High (AC:H)
Privileges Required Low (PR:L)
User Interaction Required (UI:R)
Scope Changed (S:C)
Confidentiality None (C:N)
Integrity Low (I:L)
Availability None (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.

github.com/opencontainers/image-spec fixed: 1.0.2
Upgrade github.com/opencontainers/image-spec to 1.0.2
Verify Direct and Transitive Dependencies

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

### Impact In 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. ### Patches The Image Specification will be updated to recommend that both manifest and index documents contain a `mediaType` field to identify the type of document. Release [v1.0.2](https://github.com/opencontainers/image-spec/releases/tag/v1.0.2) includes these updates. ### Workarounds Software attempting to deserialize an ambiguous document may reject the document if it contains both “manifests” and “layers” fields or “manifests” and “config” fields. ### References https://github.com/opencontainers/distribution-spec/security/advisories/GHSA-mc8v-mgrf-8f4m ### For more information If you have any questions or comments about this advisory: * Open an issue in https://github.com/opencontainers/image-spec * Email us at [security@opencontainers.org](mailto:security@opencontainers.org) * https://github.com/opencontainers/image-spec/commits/v1.0.2

GHSA-77vh-xpmg-72qh Affected Github.com/opencontainers/image spec Versions

1 component(s)
Fixed Versions:
1.0.2
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?
GHSA-77vh-xpmg-72qh is a security vulnerability in Github.com/opencontainers/image spec involving Clarify `mediaType` handling under CWE-843: Access of Resource Using Incompatible Type ('Type Confusion').
Which Github.com/opencontainers/image spec versions are affected?
Affected versions include releases prior to 1.0.2 across affected packages: github.com/opencontainers/image-spec.
What version fixes GHSA-77vh-xpmg-72qh?
Upgrading to 1.0.2 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/opencontainers/image-spec affected?
Yes, github.com/opencontainers/image-spec is affected in releases prior to 1.0.2. Upgrade your dependency to 1.0.2 or later.
What is the CVSS score of GHSA-77vh-xpmg-72qh?
GHSA-77vh-xpmg-72qh has a CVSS v3.1 base score of 3.0 (LOW) with vector string CVSS:3.1/AV:N/AC:H/PR:L/UI:R/S:C/C:N/I:L/A:N.
What CWE is associated with GHSA-77vh-xpmg-72qh?
GHSA-77vh-xpmg-72qh is classified under CWE-843: Access of Resource Using Incompatible Type ('Type Confusion') (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.).
How can I check Go dependencies for GHSA-77vh-xpmg-72qh?
Run the dependency tree command: 'inspect dependencies for github.com/opencontainers/image-spec'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "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
  }
}