Every CVE Search/ Get API key

CVE-2024-29902

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

4.2 MediumFix available

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.

Attack profile

How easy it is to exploit

Attack vector
Network
Complexity
High
Privileges needed
High
User interaction
Required

What an attacker can affect

Confidentiality
None
Integrity
None
Availability
High

Exploit likelihood

0.66%Up 0.6 points since Apr 11, 2024
90%50%10%1%

What each source reports

CVE List Score used 4.2

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

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.

Record
CVE-2024-29902
CVSS 3.1
4.2 MediumCVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
Weakness
CWE-770
Updated
2026-11-02
EUVDEUVD-2024-1155 4.2

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.

Record
EUVD-2024-1155
CVSS 3.1
4.2 MediumCVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
Updated
2026-11-03
GitHub AdvisoriesGHSA-88jx-383q-w4qc 4.2

Cosign malicious attachments can cause system-wide denial of service

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

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

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.

Record
GHSA-88jx-383q-w4qc
CVSS 3.1
4.2 MediumCVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
Weakness
CWE-770
Updated
2026-11-02
NVD 4.2

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.

Record
CVE-2024-29902
CVSS 3.1
4.2 MediumCVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
CVSS 3.1
5.9 MediumCVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Weakness
CWE-770
Updated
2026-11-02
OSV 4.2

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

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.

Record
CVE-2024-29902
CVSS 3.1
4.2 MediumCVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
Weakness
CWE-770
Updated
2026-11-02
OSVGHSA-88jx-383q-w4qc 4.2

Cosign malicious attachments can cause system-wide denial of service

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

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

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.

Record
GHSA-88jx-383q-w4qc
CVSS 3.1
4.2 MediumCVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H
Weakness
CWE-770
Updated
2026-11-02
Show 7 moreShow less
OSVRHEA-2024:4022 7.5

Red Hat Enhancement Advisory: Red Hat OpenShift Pipelines Client tkn for 1.15.0 release

Record
RHEA-2024:4022
CVSS 3.1
7.5 HighCVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
Updated
2026-11-02
OSVBIT-cosign-2024-29902 No score

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

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.

Record
BIT-cosign-2024-29902
Updated
2026-11-02
OSVGO-2024-2718 No score

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

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

Record
GO-2024-2718
Updated
2026-11-02
OSVopenSUSE-SU-2024:13863-1 No score

cosign-2.2.4-1.1 on GA media

These are all security issues fixed in the cosign-2.2.4-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:13863-1
Updated
2026-11-02
OSVopenSUSE-SU-2024:13903-1 No score

teleport-15.2.4-1.1 on GA media

These are all security issues fixed in the teleport-15.2.4-1.1 package on the GA media of openSUSE Tumbleweed.

Record
openSUSE-SU-2024:13903-1
Updated
2026-11-02
OSVSUSE-SU-2024:1486-1 No score

Security update for cosign

This update for cosign fixes the following issues:

  • CVE-2024-29902: Fixed denial of service on host machine via remote image with a malicious attachments (bsc#1222835)
  • CVE-2024-29903: Fixed denial of service on host machine via malicious software artifacts (bsc#1222837)

Other fixes:

  • Updated to 2.2.4 (jsc#SLE-23879)
    • Fixes for GHSA-88jx-383q-w4qc and GHSA-95pr-fxf5-86gv (#3661)
    • ErrNoSignaturesFound should be used when there is no signature attached to an image. (#3526)
    • fix semgrep issues for dgryski.semgrep-go ruleset (#3541)
    • Honor creation timestamp for signatures again (#3549)
    • Features
      • Adds Support for Fulcio Client Credentials Flow, and Argument to Set Flow Explicitly (#3578)
Record
SUSE-SU-2024:1486-1
Updated
2026-11-02
OSVSUSE-SU-2024:1486-2 No score

Security update for cosign

This update for cosign fixes the following issues:

  • CVE-2024-29902: Fixed denial of service on host machine via remote image with a malicious attachments (bsc#1222835)
  • CVE-2024-29903: Fixed denial of service on host machine via malicious software artifacts (bsc#1222837)

Other fixes:

  • Updated to 2.2.4 (jsc#SLE-23879)
    • Fixes for GHSA-88jx-383q-w4qc and GHSA-95pr-fxf5-86gv (#3661)
    • ErrNoSignaturesFound should be used when there is no signature attached to an image. (#3526)
    • fix semgrep issues for dgryski.semgrep-go ruleset (#3541)
    • Honor creation timestamp for signatures again (#3549)
    • Features
      • Adds Support for Fulcio Client Credentials Flow, and Argument to Set Flow Explicitly (#3578)
Record
SUSE-SU-2024:1486-2
Updated
2026-11-02

Affected products

Affected packages

Affected packages
PackageAffectedFixed
github.com/sigstore/cosign
Go
through 2.2.3 None known
github.com/sigstore/cosign/v2
Go
through 2.2.3
2.2.4
cosign
Bitnami
before 2.2.4
2.2.4
github.com/sigstore/cosign/v2
Go
before 2.2.4
2.2.4
github.com/sigstore/cosign
Go
All versions None known
openshift-pipelines-client
Red Hat:openshift_pipelines:1.15::el8
before 0:1.15.0-11496.el8
0:1.15.0-11496.el8
openshift-pipelines-client-redistributable
Red Hat:openshift_pipelines:1.15::el8
before 0:1.15.0-11496.el8
0:1.15.0-11496.el8
cosign
SUSE:Linux Enterprise Module for Basesystem 15 SP5
before 2.2.4-150400.3.20.1
2.2.4-150400.3.20.1
cosign
openSUSE:Leap 15.5
before 2.2.4-150400.3.20.1
2.2.4-150400.3.20.1
cosign
SUSE:Linux Enterprise Module for Basesystem 15 SP6
before 2.2.4-150400.3.20.1
2.2.4-150400.3.20.1
cosign
openSUSE:Leap 15.6
before 2.2.4-150400.3.20.1
2.2.4-150400.3.20.1
cosign
openSUSE:Tumbleweed
before 2.2.4-1.1
2.2.4-1.1
teleport
openSUSE:Tumbleweed
before 15.2.4-1.1
15.2.4-1.1

History

History
RecordedChangedSources
aliases, publishedEUVD
first indexedCVE List, GitHub Advisories, NVD, OSV

Dates are when Every CVE recorded each change. Upstream dates may differ.

In short

CVE-2024-29902 is a medium vulnerability (CVSS 4.2) in Sigstore Cosign, published April 10, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.66%, the 51st percentile. Fixed in github.com/sigstore/cosign/v2 2.2.4.

References

Show 40 moreShow less
MoveEnter Open