# CVE-2023-2253: distribution catalog API endpoint can lead to OOM via malicious user input

> An attacker can cause a denial of service by submitting an excessively large parameter to the catalog endpoint, leading to memory exhaustion.

- **Severity:** Medium 6.5 (`CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`)
- **Exploited in the wild:** Not known
- **Login needed:** Any signed-in user
- **Attackable:** Over the internet
- **Victim action needed:** Not needed
- **Fix available:** Yes
- **Published:** 6 Jun 2023
- **Updated:** 7 Jan 2025
- **Also known as:** AZL-27020, AZL-27027, CLEANSTART-2026-JU66662, CLEANSTART-2026-SL35444, DEBIAN-CVE-2023-2253, DLA-3473-1, DSA-5414-1, GHSA-hqxw-f8mx-cpmw, GO-2023-1772, MGASA-2023-0207, MINI-qpmq-wjq3-v5r6, SUSE-SU-2023:2153-1, SUSE-SU-2023:2154-1, SUSE-SU-2023:2298-1, UBUNTU-CVE-2023-2253, openSUSE-SU-2024:12926-1

## What is CVE-2023-2253?

CVE-2023-2253 is a medium-severity denial of service vulnerability in Redhat Openshift Container Platform, published on 6 Jun 2023. Any signed-in user can exploit it over the network, with no action from the victim.

### Official description

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.

Weakness: CWE-770 (Allocation of Resources Without Limits or Throttling), CWE-475 (Undefined Behavior for Input to API)

## Which versions are affected by CVE-2023-2253?

3 open source packages ship an affected version, including github.com/docker/distribution and github.com/distribution/distribution. It affects 3 products.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/docker/distribution` | Go | All versions | 2.8.2-beta.1 |
| `github.com/docker/distribution` | Go | All versions | 2.8.2-beta.1 |
| `github.com/distribution/distribution` | Go | All versions | 2.8.2-beta.1+incompatible |
| `docker-distribution` | SUSE:Linux Enterprise Module for Containers 12 | All versions | 2.6.2-13.9.1 |
| `distribution` | SUSE:Linux Enterprise Module for Containers 15 SP4 | All versions | 2.8.1-150400.9.18.1 |
| `distribution` | SUSE:Linux Enterprise Module for Containers 15 SP4 | All versions | 2.8.2-150400.9.21.1 |
| `distribution` | openSUSE:Leap 15.4 | All versions | 2.8.1-150400.9.18.1 |
| `distribution` | openSUSE:Leap 15.4 | All versions | 2.8.2-150400.9.21.1 |
| `distribution-registry` | openSUSE:Tumbleweed | All versions | 2.8.2-1.1 |

Products: Redhat Openshift Api for Data Protection, Redhat Openshift Container Platform, Redhat Openshift Developer Tools and Services.

## How do I fix CVE-2023-2253?

Upgrade github.com/docker/distribution to 2.8.2-beta.1 or later.

## Is CVE-2023-2253 being exploited?

There is no known exploitation of CVE-2023-2253 in the wild and no public exploit code.

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2023-2253 and fix it if it is affected.

What it is: CVE-2023-2253 is a medium-severity denial of service vulnerability in Redhat Openshift Container Platform, published on 6 Jun 2023. Any signed-in user can exploit it over the network, with no action from the victim.
Exploitation: There is no known exploitation of CVE-2023-2253 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/docker/distribution (Go): affected all versions; fixed in 2.8.2-beta.1
- github.com/docker/distribution (Go): affected all versions; fixed in 2.8.2-beta.1
- github.com/distribution/distribution (Go): affected all versions; fixed in 2.8.2-beta.1+incompatible

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2023-2253/ (Markdown: https://insights.sbomify.com/CVE-2023-2253/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2023-2253
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2023-2253
- OSV: https://osv.dev/vulnerability/CVE-2023-2253

---
From sbomify Insights: https://insights.sbomify.com/CVE-2023-2253/
Summaries are generated and may contain mistakes; the official description above is the record.
