Public mode

No access to your tenant or devices. Every item links to its source. What this means

Sources need attention Customize Public modeDiscuss ChangeIntel on Discord

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

CVSS 3.1 4.2 MEDIUMEUVD CVSS 3.1 4.2 CVSS 3.1 · [email protected] · Secondary 4.2 MEDIUMCVSS 3.1 · [email protected] · Primary 5.9 MEDIUMCVSS_V3 Publisher rating MODERATEFixed by github.com/sigstore/cosign/v2 2.2.4osv · severity unknownFixed by github.com/sigstore/cosign/v2 2.2.4KEV status unknown

cve-program · CVE-2024-29902

Published

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.

Read the publisher's advisory

euvd · EUVD-2024-1155

Published

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.

Read the publisher's advisory

nvd · CVE-2024-29902

Published

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.

Read the publisher's advisory

osv · GHSA-88jx-383q-w4qc

Published

### Summary 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. ### Details 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. The root cause is that Cosign reads the contents of the attachments entirely into memory on line 238 below: https://github.com/sigstore/cosign/blob/9bc3ee309bf35d2f6e17f5d23f231a3d8bf580bc/pkg/oci/remote/remote.go#L228-L239 ...and prior to that, neither Cosign nor go-containerregistry checks the size of the attachment and enforces a max cap. In the case of a remote layer of `f *attached`, go-containerregistry will invoke this API: https://github.com/google/go-containerregistry/blob/a0658aa1d0cc7a7f1bcc4a3af9155335b6943f40/pkg/v1/remote/layer.go#L36-L40 ```golang func (rl *remoteLayer) Compressed() (io.ReadCloser, error) { // We don't want to log binary layers -- this can break terminals. ctx := redact.NewContext(rl.ctx, "omitting binary blobs from logs") return rl.fetcher.fetchBlob(ctx, verify.SizeUnknown, rl.digest) } ``` Notice that the second argument to `rl.fetcher.fetchBlob` is `verify.SizeUnknown` which results in not using the `io.LimitReader` in `verify.ReadCloser`: https://github.com/google/go-containerregistry/blob/a0658aa1d0cc7a7f1bcc4a3af9155335b6943f40/internal/verify/verify.go#L82-L100 ```golang func ReadCloser(r io.ReadCloser, size int64, h v1.Hash) (io.ReadCloser, error) { w, err := v1.Hasher(h.Algorithm) if err != nil { return nil, err } r2 := io.TeeReader(r, w) // pass all writes to the hasher. if size != SizeUnknown { r2 = io.LimitReader(r2, size) // if we know the size, limit to that size. } return &and.ReadCloser{ Reader: &verifyReader{ inner: r2, hasher: w, expected: h, wantSize: size, }, CloseFunc: r.Close, }, nil } ``` ### Impact 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. ### Remediation Update to the latest version of Cosign, which limits the number of attachments. An environment variable can override this value.

Read the publisher's advisory

osv · GO-2024-2718

Published

Cosign malicious attachments can cause system-wide denial of service in github.com/sigstore/cosign

Read the publisher's advisory

Affected versions, risk and source history

cve-program · CVE-2024-29902

Published

cosign

Vendor product

Publisher's version information

Shown as published. These rules are not interpreted as NuGet package version ranges.

{
                    "vendor": "sigstore",
                    "product": "cosign",
                    "versions": [
                        {
                            "version": "< 2.2.4",
                            "status": "affected"
                        }
                    ]
                }

Original source record · Cite this exact observation · Complete original publisher JSON

euvd · EUVD-2024-1155

Published

EUVD source date text has no stated timezone and is retained without inventing a UTC instant. Related bulletin membership is not an alias, common cause or applicability claim. A missing vector with a zero score is treated as unrated. Complete vendor/product and underlying source evidence remains in the original JSON.

Original publisher date fields

datePublished: Apr 10, 2024, 10:28:19 PM

dateUpdated: Aug 2, 2024, 1:17:58 AM

7 related source bulletins · separate from aliases

openSUSE-SU-2024:13863-1: cosign-2.2.4-1.1 on GA media

CVE-2024-29902 · CVE-2024-29903

WID-SEC-W-2024-1707: Red Hat Advanced Cluster Security for Kubernetes: Mehrere Schwachstellen ermöglichen Offenlegung von Informationen

CVE-2024-28849 · CVE-2024-29902 · CVE-2024-29903

RHSA-2024:4836: Red Hat Security Advisory: RHACS 4.5 enhancement and security update

CVE-2024-28849 · CVE-2024-29902 · CVE-2024-29903

SUSE-SU-2024:1486-2: Security update for cosign

CVE-2024-29902 · CVE-2024-29903

RHEA-2024:4022: Red Hat Enhancement Advisory: Red Hat OpenShift Pipelines Client tkn for 1.15.0 release

CVE-2023-45288 · CVE-2024-28110 · CVE-2024-28180 · CVE-2024-29902 · CVE-2024-29903

openSUSE-SU-2024:13903-1: teleport-15.2.4-1.1 on GA media

CVE-2023-45288 · CVE-2024-29902 · CVE-2024-32650

SUSE-SU-2024:1486-1: Security update for cosign

CVE-2024-29902 · CVE-2024-29903

No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.

Original source record · Cite this exact observation · Complete original publisher JSON

nvd · CVE-2024-29902

Published

NVD analysis and CPE criteria are source context, not proof that a package or your environment is affected. Complete affected data, logical configurations and SSVC are retained in the original JSON.

Source analysis status: Analyzed

Weakness classifications: CWE-770

Original publisher date fields

published: 2024-04-10T23:15:06.920

lastModified: 2026-06-17T07:23:20.123

1 source CPE criteria · context only
  • cpe:2.3:a:sigstore:cosign:*:*:*:*:*:*:*:*

The original JSON retains the logical configuration operators, exclusions and version bounds.

No normalized affected-package data is projected for this source revision. The original publisher record may contain additional product and version evidence; this does not establish that a package is unaffected.

Original source record · Cite this exact observation · Complete original publisher JSON

osv · GHSA-88jx-383q-w4qc

Published

github.com/sigstore/cosign

Go

SEMVER · introduced 0 → last_affected 2.2.3

github.com/sigstore/cosign/v2

Go

SEMVER · introduced 0 → fixed 2.2.4

Original source record · Cite this exact observation · Complete original publisher JSON

osv · GO-2024-2718

Published

github.com/sigstore/cosign

Go

SEMVER · introduced 0

github.com/sigstore/cosign/v2

Go

SEMVER · introduced 0 → fixed 2.2.4

Original source record · Cite this exact observation · Complete original publisher JSON

ChangeIntel

An IT change radar: releases, security, known issues, retirements, documentation changes, and service status from public sources. Every item links to supporting evidence; dates and statuses can change after they are read.

Sources read 16 Nov 13:53 UTC · 274 of 275 readable · 250 fully read · 20 waiting for GitHub's hourly limit · documentation 469/469 current