Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/opencontainers/distribution-spec/specs-go
  4. ›
  5. CVE-2021-41190

CVE-2021-41190: Access of Resource Using Incompatible Type ('Type Confusion')

November 18, 2021 (updated July 18, 2023)

The OCI Distribution Spec project defines an API protocol to facilitate and standardize the distribution of content. In the OCI Distribution Specification version 1.0.0 and prior, the Content-Type header alone was used to determine the type of document during push and pull operations. Documents that contain both “manifests” and “layers” fields could be interpreted as either a manifest or an index in the absence of an accompanying Content-Type header. If a Content-Type header changed between two pulls of the same digest, a client may interpret the resulting content differently. The OCI Distribution Specification has been updated to require that a mediaType value present in a manifest or index match the Content-Type header used during the push and pull operations. Clients pulling from a registry may distrust the Content-Type header and reject an ambiguous document that contains both “manifests” and “layers” fields or “manifests” and “config” fields if they are unable to update to version 1.0.1 of the spec.

References

  • github.com/advisories/GHSA-mc8v-mgrf-8f4m
  • github.com/opencontainers/distribution-spec/commit/ac28cac0557bcd3084714ab09f9f2356fe504923
  • github.com/opencontainers/distribution-spec/security/advisories/GHSA-mc8v-mgrf-8f4m
  • nvd.nist.gov/vuln/detail/CVE-2021-41190

Code Behaviors & Features

Detect and mitigate CVE-2021-41190 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions before 1.0.1

Fixed versions

  • 1.0.1

Solution

Upgrade to version 1.0.1 or above.

Impact 5 MEDIUM

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:C/C:N/I:L/A:N

Learn more about CVSS

Weakness

  • CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')

Source file

go/github.com/opencontainers/distribution-spec/specs-go/CVE-2021-41190.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:14:28 +0000.