VYPR
Moderate severityNVD Advisory· Published Feb 16, 2023· Updated Mar 10, 2025

containerd OCI image importer memory exhaustion

CVE-2023-25153

Description

containerd is an open source container runtime. Before versions 1.6.18 and 1.5.18, when importing an OCI image, there was no limit on the number of bytes read for certain files. A maliciously crafted image with a large file where a limit was not applied could cause a denial of service. This bug has been fixed in containerd 1.6.18 and 1.5.18. Users should update to these versions to resolve the issue. As a workaround, ensure that only trusted images are used and that only trusted users have permissions to import images.

Affected packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
github.com/containerd/containerdGo
< 1.5.181.5.18
github.com/containerd/containerdGo
>= 1.6.0, < 1.6.181.6.18

Affected products

1

Patches

1
0c314901076a

Merge pull request from GHSA-259w-8hf6-59c2

https://github.com/containerd/containerdDerek McGowanFeb 15, 2023via ghsa
1 file changed · +7 5
  • images/archive/importer.go+7 5 modified
    @@ -232,12 +232,14 @@ func ImportIndex(ctx context.Context, store content.Store, reader io.Reader, opt
     	return writeManifest(ctx, store, idx, ocispec.MediaTypeImageIndex)
     }
     
    +const (
    +	kib       = 1024
    +	mib       = 1024 * kib
    +	jsonLimit = 20 * mib
    +)
    +
     func onUntarJSON(r io.Reader, j interface{}) error {
    -	b, err := io.ReadAll(r)
    -	if err != nil {
    -		return err
    -	}
    -	return json.Unmarshal(b, j)
    +	return json.NewDecoder(io.LimitReader(r, jsonLimit)).Decode(j)
     }
     
     func onUntarBlob(ctx context.Context, r io.Reader, store content.Ingester, size int64, ref string) (digest.Digest, error) {
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

7

News mentions

0

No linked articles in our index yet.