Advisory Database
  • Advisories
  • Dependency Scanning
  1. golang
  2. ›
  3. github.com/sigstore/cosign
  4. ›
  5. CVE-2024-29903

CVE-2024-29903: Cosign malicious artifacts can cause machine-wide DoS

April 11, 2024

Maliciously-crafted software artifacts can cause denial of service of the machine running Cosign, thereby impacting all services on the machine. The root cause is that Cosign creates slices based on the number of signatures, manifests or attestations in untrusted artifacts. As such, the untrusted artifact can control the amount of memory that Cosign allocates.

As an example, these lines demonstrate the problem:

https://github.com/sigstore/cosign/blob/286a98a4a99c1b2f32f84b0d560e324100312280/pkg/oci/remote/signatures.go#L56-L70

This Get() method gets the manifest of the image, allocates a slice equal to the length of the layers in the manifest, loops through the layers and adds a new signature to the slice.

The exact issue is Cosign allocates excessive memory on the lines that creates a slice of the same length as the manifests.

References

  • github.com/advisories/GHSA-95pr-fxf5-86gv
  • github.com/sigstore/cosign
  • github.com/sigstore/cosign/blob/14795db16417579fac0c00c11e166868d7976b61/pkg/cosign/verify.go
  • github.com/sigstore/cosign/blob/286a98a4a99c1b2f32f84b0d560e324100312280/pkg/oci/remote/signatures.go
  • github.com/sigstore/cosign/commit/629f5f8fa672973503edde75f84dcd984637629e
  • github.com/sigstore/cosign/releases/tag/v2.2.4
  • github.com/sigstore/cosign/security/advisories/GHSA-95pr-fxf5-86gv
  • nvd.nist.gov/vuln/detail/CVE-2024-29903

Code Behaviors & Features

Detect and mitigate CVE-2024-29903 with GitLab Dependency Scanning

Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →

Affected versions

All versions up to 2.2.3

Solution

Unfortunately, there is no solution available yet.

Impact 4.2 MEDIUM

CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H

Learn more about CVSS

Weakness

  • CWE-770: Allocation of Resources Without Limits or Throttling

Source file

go/github.com/sigstore/cosign/CVE-2024-29903.yml

Spotted a mistake? Edit the file on GitLab.

  • Site Repo
  • About GitLab
  • Terms
  • Privacy Statement
  • Contact

Page generated Wed, 14 May 2025 12:16:10 +0000.