Skip to content
OpenAdvisories

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.

Affected products

VendorProductAffectedFixed
sigstore cosign < 2.2.1 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
SLES 15 SP5 cosign 2.2.1-150400.3.14.1 SUSE-SU-2023:4870-1
SLES 15 SP4 cosign 2.2.1-150400.3.14.1 SUSE-SU-2023:4870-1
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed cosign 2.2.1-1.1 openSUSE-SU-2024:13402-1
openSUSE Leap 15.5 cosign 2.2.1-150400.3.14.1 SUSE-SU-2023:4870-1
openSUSE Leap 15.4 cosign 2.2.1-150400.3.14.1 SUSE-SU-2023:4870-1
ReleasePackageFixed inAdvisory
Alpine v3.24 cosign 2.2.1-r0 —
Alpine v3.23 cosign 2.2.1-r0 —
Alpine v3.22 cosign 2.2.1-r0 —
Alpine v3.21 cosign 2.2.1-r0 —
Alpine v3.20 cosign 2.2.1-r0 —
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Alpine v3.19 cosign 2.2.1-r0 —

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling aactl 0.4.12-r7 —
Wolfi rolling apko 0.11.3-r0 —
Wolfi rolling cosign 2.2.1-r0 —
Wolfi rolling flux-source-controller 1.7.3-r0 —
Wolfi rolling ko 0.15.1-r0 —
Wolfi rolling kubescape 3.0.3-r3 —
Wolfi rolling melange 0.5.3-r0 —
Wolfi rolling policy-controller 0.8.3-r1 —
Wolfi rolling skaffold 2.10.0-r2 —
Wolfi rolling slsa-verifier 2.5.1-r4 —
Wolfi rolling spire-server 1.8.4-r1 —
Wolfi rolling tekton-chains 0.19.0-r3 —
Wolfi rolling tkn 0.33.0-r2 —

Affected packages

EcosystemPackageAffectedFixedRecord
Go github.com/sigstore/cosign < 1.13.2 1.13.2 GHSA-vfp6-jrw2-99g9
Go github.com/sigstore/cosign all versions — GO-2023-2181
Go github.com/sigstore/cosign/v2 < 2.2.1 2.2.1 GHSA-vfp6-jrw2-99g9

Advisories 2

References