HighGHSA-hqxw-f8mx-cpmwCVE-2023-2253GO-2023-1772

distribution catalog API endpoint can lead to OOM via malicious user input

Published 11 May 2023 · Updated 10 Sept 2026

Is your project on an affected github.com/docker/distribution?

Private repo? Upload its lockfile instead, or connect GitHub to check every repo.

Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie

Affected package

Affected
<2.8.2-beta.1
Fixed in
2.8.2-beta.1
Update to the fixed version for your release line, for example:go get github.com/docker/distribution@v2.8.2-beta.1

Details

Impact

Systems that run distribution built after a specific commit running on memory-restricted environments can suffer from denial of service by a crafted malicious /v2/_catalog API endpoint request.

Patches

Upgrade to at least 2.8.2-beta.1 if you are running v2.8.x release. If you use the code from the main branch, update at least to the commit after f55a6552b006a381d9167e328808565dd2bf77dc.

Workarounds

There is no way to work around this issue without patching. Restrict access to the affected API endpoint: see the recommendations section.

References

/v2/_catalog endpoint accepts a parameter to control the maximum amount of records returned (query string: n).

When not given the default n=100 is used. The server trusts that n has an acceptable value, however when using a maliciously large value, it allocates an array/slice of n of strings before filling the slice with data.

This behaviour was introduced ~7yrs ago [1].

Recommendation

The /v2/_catalog endpoint was designed specifically to do registry syncs with search or other API systems. Such an endpoint would create a lot of load on the backend system, due to overfetch required to serve a request in certain implementations.

Because of this, we strongly recommend keeping this API endpoint behind heightened privilege and avoiding leaving it exposed to the internet.

For more information

If you have any questions or comments about this advisory:

  • Open an issue in distribution repository
  • Email us at [cncf-distribution-security@lists.cncf.io](mailto:cncf-distribution-security@lists.cncf.io)

[1] faulty commit

Is GHSA-hqxw-f8mx-cpmw in any of your client repos?

Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected github.com/docker/distribution, and gives you the command that fixes it.

More advisories for github.com/docker/distribution

  • LowCVE-2026-85747Distribution: Client does not verify returned content against requested digest in github.com/distribution/distribution · 5 Nov 2026
  • MediumCVE-2026-85747Distribution: Client `manifests.Get()` does not verify returned content against requested digest · 15 Oct 2026
  • LowGO-2022-0379Type confusion in github.com/docker/distribution · 29 Jul 2022
  • HighCVE-2017-11468Docker Registry has Allocation of Resources Without Limits or Throttling · 13 May 2022
  • LowGHSA-qq97-vm5h-rrhgOCI Manifest Type Confusion Issue · 8 Feb 2022
  • LowCVE-2017-11468Uncontrolled resource allocation in github.com/docker/distribution · 14 Apr 2021
github.com/docker/distribution security overview

References

Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.