CVE-2022-0379: Type confusion in github.com/docker/distribution

Summary

29/07/2022
N/A
Yes i
Unrated
Not published

GO-2022-0379: Type confusion in github.com/docker/distribution. Affects github.com/docker/distribution versions < 2.8.0+incompatible. Fixed in 2.8.0+incompatible. 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 MarkAI Find prospects already talking about the problem you solve AI watches the communities your customers use to find qualified prospects, then alerts you when a conversation is worth joining. See MarkAI

Background

github.com/docker/distribution is a Go package that provides a registry client and server implementation for the Docker Registry HTTP API V2. It allows users to push and pull container images from a registry. The package is widely used in the container ecosystem. However, versions prior to 2.8.0 are vulnerable to a type confusion vulnerability.

Vulnerability Detail

The type confusion vulnerability in github.com/docker/distribution allows a maliciously crafted OCI Container Image to be parsed in two different ways without modifying the image's digest. This invalidates the common pattern of relying on container image digests for equivalence. Systems that rely on digest equivalence for image attestations may be vulnerable to this issue. The vulnerability can have serious ramifications as it can lead to the execution of arbitrary code or unauthorized access to sensitive information.

How To Fix

Latest published version: v2.8.3+incompatible as of 22 Oct 2026

go get github.com/docker/distribution@v2.8.3+incompatible

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.8.0+incompatible

This is the first release that contains the fix.

go get github.com/docker/distribution@v2.8.0+incompatible

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

Workaround

There is no known workaround for this vulnerability. It is essential to update to the fixed version of the package to mitigate the risk.

Conclusion

The type confusion vulnerability in github.com/docker/distribution can have serious consequences, including the execution of arbitrary code or unauthorized access to sensitive information. It is crucial to update to version 2.8.0 or later of the package to mitigate the risk. For further support on vulnerability remediation, please contact DevNack.com.

See every vulnerability recorded for github.com/docker/distribution →

Share this vulnerability

FAQ

github.com/docker/distribution is a Go package that provides a registry client and server implementation for the Docker Registry HTTP API V2. It is widely used in the container ecosystem.

The vulnerability can lead to type confusion, allowing a maliciously crafted OCI Container Image to be parsed in two different ways without modifying the image's digest. This can result in the execution of arbitrary code or unauthorized access to sensitive information.

To fix this vulnerability, update the github.com/docker/distribution package to version 2.8.0 or later. Rebuild your application to ensure it is using the patched version.

There is no known workaround for this vulnerability. Updating to the fixed version of the package is the recommended solution.

You can find more information about this vulnerability in the official vulnerability report at https://pkg.go.dev/vuln/GO-2022-0379.

References

Related vulnerabilities

Recent vulnerabilities recorded for github.com/docker/distribution.

How To Fix

Latest published version: v2.8.3+incompatible as of 22 Oct 2026

go get github.com/docker/distribution@v2.8.3+incompatible

Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.

If you need the minimum change

2.8.0+incompatible

This is the first release that contains the fix.

go get github.com/docker/distribution@v2.8.0+incompatible

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