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

Low 3.1 Published Updated

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

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

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, CWE-400

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.

PackageAffectedFixed in
github.com/sigstore/cosign GoAll versionsNone
github.com/sigstore/cosign GoAll versions1.13.2
github.com/sigstore/cosign GoAll versions1.13.2
cosign BitnamiAll versions2.2.1
github.com/sigstore/cosign/v2 GoAll versions2.2.1
github.com/sigstore/cosign/v2 GoAll versions2.2.1
1 more packages
github.com/sigstore/cosign/v2 GoAll versions2.2.1
Linux distribution packages (5)
cosign SUSE:Linux Enterprise Module for Basesystem 15 SP4All versions2.2.1-150400.3.14.1
cosign SUSE:Linux Enterprise Module for Basesystem 15 SP5All versions2.2.1-150400.3.14.1
cosign openSUSE:Leap 15.4All versions2.2.1-150400.3.14.1
cosign openSUSE:Leap 15.5All versions2.2.1-150400.3.14.1
cosign openSUSE:TumbleweedAll versions2.2.1-1.1

Products include Sigstore Cosign.

How do I fix CVE-2023-46737?

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

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2023-46737 being exploited?

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

Sources

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.

Is CVE-2023-46737 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free