A flaw was found in the `/v2/_catalog` endpoint in distribution/distribution, which accepts a parameter to control the maximum number of records returned (query string: `n`). This vulnerability allows a malicious user to submit an unreasonably large value for `n,` causing the allocation of a massive string array, possibly causing a denial of service through excessive use of memory.
A flaw was found in the `/v2/_catalog` endpoint in distribution/distribution, which accepts a parameter to control the maximum number of records returned (query string: `n`). This vulnerability allows a malicious user to submit an unreasonably large value for `n,` causing the allocation of a massive string array, possibly causing a denial of service through excessive use of memory.
A flaw was found in the `/v2/_catalog` endpoint in distribution/distribution, which accepts a parameter to control the maximum number of records returned (query string: `n`). This vulnerability allows a malicious user to submit an unreasonably large value for `n,` causing the allocation of a massive string array, possibly causing a denial of service through excessive use of memory.
### 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](https://github.com/distribution/distribution/commit/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](https://github.com/distribution/distribution)
* Email us at [[email protected]](mailto:[email protected])
[1] [faulty commit](https://github.com/distribution/distribution/blob/b7e26bac741c76cb792f8e14c41a2163b5dae8df/registry/handlers/catalog.go#L45)
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.
EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.
Original publisher date fields
datePublished: Jun 6, 2023, 12:00:00 AM
dateUpdated: Jan 7, 2025, 9:30:03 PM
11 related source bulletins · separate from aliases
SUSE-SU-2023:2153-1: Security update for docker-distribution
CVE-2023-2253
RHSA-2023:5390: Red Hat Security Advisory: OpenShift Container Platform 4.12.36 bug fix and security update
CVE-2023-2253
msrc_CVE-2023-2253: A flaw was found in the `/v2/_catalog` endpoint in distribution/distribution which accepts a parameter to control the maximum number of records returned (query string: `n`). This vulnerability allows a malicious user to submit an unreasonably large value for `n` causing the allocation of a massive string array possibly causing a denial of service through excessive use of memory.
CVE-2023-2253
WID-SEC-W-2024-0794: Dell ECS: Mehrere Schwachstellen
openSUSE-SU-2024:12926-1: distribution-registry-2.8.2-1.1 on GA media
CVE-2023-2253
RHSA-2023:5155: Red Hat Security Advisory: [impact]: OpenShift Container Platform 4.13.13 bug fix and security update
CVE-2023-2253
SUSE-SU-2023:2298-1: Security update for distribution
CVE-2023-2253
WID-SEC-W-2023-2388: Red Hat OpenShift: Schwachstelle ermöglicht Denial of Service
CVE-2023-2253
SUSE-SU-2023:2154-1: Security update for distribution
CVE-2023-2253
RHSA-2023:5697: Red Hat Security Advisory: OpenShift Container Platform 4.11.52 bug fix and security update
CVE-2023-2253 · CVE-2023-39325
No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.
NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.
The original JSON retains the logical configuration operators, exclusions and version bounds.
No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.