GHSA-5j5w-g665-5m35: Github.com/containerd/containerd Ambiguous OCI Manifest Parsing Vulnerability

LOW
CVSS 3.0
CWE-843
Published
Advisory Summary

GHSA-5j5w-g665-5m35 is a LOW (CVSS 3.0) ambiguous oci manifest parsing vulnerability (CWE-843: Access of Resource Using Incompatible Type ('Type Confusion')) affecting Github.com/containerd/containerd libraries in the Go ecosystem. The issue involves ambiguous oci manifest parsing. Remediation is available by upgrading affected packages to version 1.4.12, 1.5.8.

GHSA-5j5w-g665-5m35 at a Glance

CVE Identifier N/A
GHSA Identifier GHSA-5j5w-g665-5m35
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/containerd/containerd
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-5j5w-g665-5m35

To remediate this vulnerability, upgrade all affected Github.com/containerd/containerd 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/containerd/containerd fixed: 1.4.12
Upgrade github.com/containerd/containerd to 1.4.12
github.com/containerd/containerd fixed: 1.5.8
Upgrade github.com/containerd/containerd to 1.5.8
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/containerd/containerd

How to Check if You Are Affected

To determine whether your application is affected by GHSA-5j5w-g665-5m35, inspect your project dependencies for Github.com/containerd/containerd:

inspect dependencies for github.com/containerd/containerd

Analyze the terminal output to locate any version of Github.com/containerd/containerd in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.4.12), 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/containerd/containerd, 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 Distribution Specification version 1.0.0 and prior and in the OCI Image Specification version 1.0.1 and prior, manifest and index documents are ambiguous without an accompanying Content-Type HTTP header. Versions of containerd prior to 1.4.12 and 1.5.8 treat the Content-Type header as trusted and deserialize the document according to that header. If the Content-Type header changed between pulls of the same ambiguous document (with the same digest), the document may be interpreted differently, meaning that the digest alone is insufficient to unambiguously identify the content of the image. ### Patches This issue has been fixed in containerd 1.4.12 and 1.5.8. Image pulls for manifests that contain a “manifests” field or indices which contain a “layers” field are rejected. ### Workarounds Ensure you only pull images from trusted sources. ### References https://github.com/opencontainers/distribution-spec/security/advisories/GHSA-mc8v-mgrf-8f4m https://github.com/opencontainers/image-spec/security/advisories/GHSA-77vh-xpmg-72qh ### For more information If you have any questions or comments about this advisory: * Open an issue in [containerd](https://github.com/containerd/containerd/issues/new/choose) * Email us at [security@containerd.io](mailto:security@containerd.io)

GHSA-5j5w-g665-5m35 Affected Github.com/containerd/containerd Versions

2 component(s)
Fixed Versions:
1.4.121.5.8
Product / Package Ecosystem Affected Versions Fixed Version
github.com/containerd/containerd
Go
< 1.4.12
1.4.12
github.com/containerd/containerd
Go
≥ 1.5.0
< 1.5.8
1.5.8

References

Frequently Asked Questions

What is GHSA-5j5w-g665-5m35?
GHSA-5j5w-g665-5m35 is a security vulnerability in Github.com/containerd/containerd involving Ambiguous OCI manifest parsing under CWE-843: Access of Resource Using Incompatible Type ('Type Confusion').
Which Github.com/containerd/containerd versions are affected?
Affected versions include releases prior to 1.4.12, 1.5.8 across affected packages: github.com/containerd/containerd.
What version fixes GHSA-5j5w-g665-5m35?
Upgrading to 1.4.12, 1.5.8 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/containerd/containerd affected?
Yes, github.com/containerd/containerd is affected in releases prior to 1.4.12, 1.5.8. Upgrade your dependency to 1.4.12, 1.5.8 or later.
What is the CVSS score of GHSA-5j5w-g665-5m35?
GHSA-5j5w-g665-5m35 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-5j5w-g665-5m35?
GHSA-5j5w-g665-5m35 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-5j5w-g665-5m35?
Run the dependency tree command: 'inspect dependencies for github.com/containerd/containerd'. 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-5j5w-g665-5m35",
  "modified" : "2023-03-30T14:50:04Z",
  "published" : "2021-11-18T16:08:58Z",
  "aliases" : [ ],
  "summary" : "Ambiguous OCI manifest parsing",
  "details" : "### Impact\n\nIn the OCI Distribution Specification version 1.0.0 and prior and in the OCI Image Specification version 1.0.1 and prior, manifest and index documents are ambiguous without an accompanying Content-Type HTTP header.  Versions of containerd prior to 1.4.12 and 1.5.8 treat the Content-Type header as trusted and deserialize the document according to that header.  If the Content-Type header changed between pulls of the same ambiguous document (with the same digest), the document may be interpreted differently, meaning that the digest alone is insufficient to unambiguously identify the content of the image.\n\n### Patches\n\nThis issue has been fixed in containerd 1.4.12 and 1.5.8.  Image pulls for manifests that contain a “manifests” field or indices which contain a “layers” field are rejected.\n\n### Workarounds\n\nEnsure you only pull images from trusted sources.\n\n### References\n\nhttps://github.com/opencontainers/distribution-spec/security/advisories/GHSA-mc8v-mgrf-8f4m\nhttps://github.com/opencontainers/image-spec/security/advisories/GHSA-77vh-xpmg-72qh\n\n### For more information\nIf you have any questions or comments about this advisory:\n* Open an issue in [containerd](https://github.com/containerd/containerd/issues/new/choose)\n* Email us at [security@containerd.io](mailto:security@containerd.io)",
  "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/containerd/containerd"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "0"
      }, {
        "fixed" : "1.4.12"
      } ]
    } ]
  }, {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/containerd/containerd"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.5.0"
      }, {
        "fixed" : "1.5.8"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "WEB",
    "url" : "https://github.com/containerd/containerd/security/advisories/GHSA-5j5w-g665-5m35"
  }, {
    "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/containerd/containerd/commit/26c76a3014e71af5ad2f396ec76e0e0ecc8e25a3"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/containerd/containerd/commit/db00065a969a983ceb0a409833f93f705f284ea4"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/containerd/containerd"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/containerd/containerd/releases/tag/v1.4.12"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/containerd/containerd/releases/tag/v1.5.8"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-843" ],
    "severity" : "LOW",
    "github_reviewed" : true,
    "github_reviewed_at" : "2021-11-18T14:43:45Z",
    "nvd_published_at" : null
  }
}