Vulnerability in github.com/opencontainers/image-spec

Summary

18/11/2021
LOW
Yes i
Low
3.0

GHSA-77vh-xpmg-72qh: Clarify mediaType handling. Affects github.com/opencontainers/image-spec versions < 1.0.2. Fixed in 1.0.2. How to fix ↓

Free scan

Check if this vulnerability affects your application

Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Mobile apps built by Devnack Design, build and launch iOS and Android apps with a senior product team. From idea to store release Start a project

Background

The package github.com/opencontainers/image-spec is a Go package that implements the OCI (Open Container Initiative) Image Specification. It provides functionality for working with container images, including manifest and index documents. These documents describe the contents and structure of container images. The package is widely used in containerization and container image management tools.

Vulnerability Detail

The vulnerability identified as GHSA-77vh-xpmg-72qh in github.com/opencontainers/image-spec affects versions 1.0.1 and prior of the OCI Image Specification. The issue arises from the lack of self-description in manifest and index documents. In these versions, documents with a single digest can be interpreted as either a manifest or an index. This ambiguity can lead to incorrect interpretation and processing of container images. The vulnerability has a CVSS score of 3.0, indicating a low severity level.

How To Fix

Minimum fixed version

1.0.2

This is the first release that contains the fix.

go get github.com/opencontainers/image-spec@v1.0.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Workaround

If software attempting to deserialize an ambiguous document encounters this vulnerability, it can reject the document if it contains both 'manifests' and 'layers' fields or 'manifests' and 'config' fields. This workaround helps mitigate the risk of incorrect interpretation of container images.

Conclusion

The vulnerability in github.com/opencontainers/image-spec can lead to incorrect interpretation and processing of container images. It is recommended to update to version 1.0.2 of the OCI Image Specification to fix the vulnerability. In the meantime, software can implement the suggested workaround to mitigate the risk. For further support on vulnerability remediation, you can contact DevNack.com.

See every vulnerability recorded for github.com/opencontainers/image-spec →

Share this vulnerability

FAQ

The vulnerability can lead to incorrect interpretation and processing of container images. This can result in unexpected behavior, security issues, or data corruption.

You can use Vulert's playground at Vulert Scanner to check if your application is affected by this vulnerability. Vulert monitors and alerts in real-time for open-source vulnerabilities, using Gopkg.lock to analyze dependencies.

The CVSS score of this vulnerability is 3.0, indicating a low severity level.

Yes, software can reject ambiguous documents if they contain specific combinations of fields. This can help mitigate the risk until the vulnerability is fixed.

You can find more information about this vulnerability in the Open Containers Initiative's advisory at https://github.com/opencontainers/distribution-spec/security/advisories/GHSA-mc8v-mgrf-8f4m.

How To Fix

Minimum fixed version

1.0.2

This is the first release that contains the fix.

go get github.com/opencontainers/image-spec@v1.0.2

Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback