CVE-2024-29902 Cosign vulnerable to system-wide denial of service via malicious attachments

Medium 4.2 Published Updated

Attackers can cause host machine denial of service by providing maliciously large attachments in remote images, impacting system availability and other services.

Exploited in the wild
Not known
Login needed
An administrator
Attackable
Over the internet
Victim action needed
A user has to click or open something
Fix
Available

What is CVE-2024-29902?

CVE-2024-29902 is a medium-severity denial of service vulnerability in sigstore cosign, published on 10 Apr 2024. An attacker needs administrator access to exploit it, and only if a user opens a file or follows a link.

Official description

Cosign provides code signing and transparency for containers and binaries. Prior to version 2.2.4, a remote image with a malicious attachment can cause denial of service of the host machine running Cosign. This can impact other services on the machine that rely on having memory available such as a Redis database which can result in data loss. It can also impact the availability of other services on the machine that will not be available for the duration of the machine denial. The root cause of this issue is that Cosign reads the attachment from a remote image entirely into memory without checking the size of the attachment first. As such, a large attachment can make Cosign read a large attachment into memory; If the attachments size is larger than the machine has memory available, the machine will be denied of service. The Go runtime will make a SigKill after a few seconds of system-wide denial. This issue can allow a supply-chain escalation from a compromised registry to the Cosign user: If an attacher has compromised a registry or the account of an image vendor, they can include a malicious attachment and hurt the image consumer. Version 2.2.4 contains a patch for the vulnerability.

Weakness: CWE-770

Which versions are affected by CVE-2024-29902?

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 versions to 2.2.3None
github.com/sigstore/cosign GoAll versions to 2.2.3None
cosign BitnamiAll versions2.2.4
github.com/sigstore/cosign/v2 GoAll versions2.2.4
github.com/sigstore/cosign/v2 GoAll versions2.2.4
1 more packages
github.com/sigstore/cosign/v2 GoAll versions2.2.4

Products include Sigstore Cosign.

How do I fix CVE-2024-29902?

Upgrade to a fixed version.

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-2024-29902 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-29902 exists.

Sources

Also known as BIT-cosign-2024-29902, CLEANSTART-2026-TB62502, GHSA-88jx-383q-w4qc, GO-2024-2718.

Is CVE-2024-29902 in your software?

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

Check your SBOMs for free