# CVE-2023-46737: Possible endless data attack from attacker-controlled registry in cosign

> An attacker controlling a registry can cause Cosign to enter an infinite loop by returning excessive attestations, denying service to other users.

- **Severity:** Low 3.1 (`CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:U/C:N/I:N/A:L`)
- **Exploited in the wild:** Not known
- **Login needed:** Not needed
- **Attackable:** Over the internet
- **Victim action needed:** A user has to click or open something
- **Fix available:** Yes
- **Published:** 7 Nov 2023
- **Updated:** 4 Sep 2024
- **Also known as:** BIT-cosign-2023-46737, CLEANSTART-2026-GS24537, GHSA-vfp6-jrw2-99g9, GO-2023-2181, SUSE-SU-2023:4870-1, openSUSE-SU-2024:13402-1

## What is CVE-2023-46737?

CVE-2023-46737 is a low-severity denial of service vulnerability in sigstore cosign, published on 7 Nov 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.

### Official description

Cosign is a sigstore signing tool for OCI containers. Cosign is susceptible to a denial of service by an attacker controlled registry. An attacker who controls a remote registry can return a high number of attestations and/or signatures to Cosign and cause Cosign to enter a long loop resulting in an endless data attack. The root cause is that Cosign loops through all attestations fetched from the remote registry in pkg/cosign.FetchAttestations. The attacker needs to compromise the registry or make a request to a registry they control. When doing so, the attacker must return a high number of attestations in the response to Cosign. The result will be that the attacker can cause Cosign to go into a long or infinite loop that will prevent other users from verifying their data. In Kyvernos case, an attacker whose privileges are limited to making requests to the cluster can make a request with an image reference to their own registry, trigger the infinite loop and deny other users from completing their admission requests. Alternatively, the attacker can obtain control of the registry used by an organization and return a high number of attestations instead the expected number of attestations. The issue can be mitigated rather simply by setting a limit to the limit of attestations that Cosign will loop through. The limit does not need to be high to be within the vast majority of use cases and still prevent the endless data attack. This issue has been patched in version 2.2.1 and users are advised to upgrade.

Weakness: CWE-835 (Loop with Unreachable Exit Condition), CWE-400 (Uncontrolled Resource Consumption)

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

7 open source packages ship an affected version, including github.com/sigstore/cosign, cosign and github.com/sigstore/cosign/v2. It affects 1 product.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/sigstore/cosign` | Go | All versions | None |
| `github.com/sigstore/cosign` | Go | All versions | 1.13.2 |
| `github.com/sigstore/cosign` | Go | All versions | 1.13.2 |
| `cosign` | Bitnami | All versions | 2.2.1 |
| `github.com/sigstore/cosign/v2` | Go | All versions | 2.2.1 |
| `github.com/sigstore/cosign/v2` | Go | All versions | 2.2.1 |
| `github.com/sigstore/cosign/v2` | Go | All versions | 2.2.1 |
| `cosign` | SUSE:Linux Enterprise Module for Basesystem 15 SP4 | All versions | 2.2.1-150400.3.14.1 |
| `cosign` | SUSE:Linux Enterprise Module for Basesystem 15 SP5 | All versions | 2.2.1-150400.3.14.1 |
| `cosign` | openSUSE:Leap 15.4 | All versions | 2.2.1-150400.3.14.1 |
| `cosign` | openSUSE:Leap 15.5 | All versions | 2.2.1-150400.3.14.1 |
| `cosign` | openSUSE:Tumbleweed | All versions | 2.2.1-1.1 |

Products: Sigstore Cosign.

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

Upgrade github.com/sigstore/cosign to 1.13.2 or later.

## Is CVE-2023-46737 being exploited?

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

## Other vulnerabilities in sigstore cosign

- [CVE-2022-35929](https://insights.sbomify.com/CVE-2022-35929/): False positive signature verification in cosign (high 7.1)
- [CVE-2026-22703](https://insights.sbomify.com/CVE-2026-22703/): Cosign verification accepts any valid Rekor entry under certain conditions (medium 5.5)
- [CVE-2022-36056](https://insights.sbomify.com/CVE-2022-36056/): Vulnerabilities with blob verification in sigstore cosign (medium 5.5)
- [CVE-2026-39395](https://insights.sbomify.com/CVE-2026-39395/): Cosign's verify-blob-attestation reports false positive when payload parsing fails (medium 4.3)
- [CVE-2024-29902](https://insights.sbomify.com/CVE-2024-29902/): Cosign vulnerable to system-wide denial of service via malicious attachments (medium 4.2)

## Fix prompt for AI coding agents

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

What it is: CVE-2023-46737 is a low-severity denial of service vulnerability in sigstore cosign, published on 7 Nov 2023. An attacker can exploit it over the internet without logging in, and only if a user opens a file or follows a link.
Exploitation: There is no known exploitation of CVE-2023-46737 in the wild and no public exploit code.

Affected packages and fixed versions:
- github.com/sigstore/cosign (Go): affected all versions; no fix listed
- github.com/sigstore/cosign (Go): affected all versions; fixed in 1.13.2
- github.com/sigstore/cosign (Go): affected all versions; fixed in 1.13.2
- cosign (Bitnami): affected all versions; fixed in 2.2.1
- github.com/sigstore/cosign/v2 (Go): affected all versions; fixed in 2.2.1
- github.com/sigstore/cosign/v2 (Go): affected all versions; fixed in 2.2.1
- github.com/sigstore/cosign/v2 (Go): affected all versions; fixed in 2.2.1

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-46737/ (Markdown: https://insights.sbomify.com/CVE-2023-46737/index.md)
```

## Sources

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

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