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

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

- **Severity:** Medium 4.2 (`CVSS:3.1/AV:N/AC:H/PR:H/UI:R/S:U/C:N/I:N/A:H`)
- **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:** Yes
- **Published:** 10 Apr 2024
- **Updated:** 2 Aug 2024
- **Also known as:** BIT-cosign-2024-29902, CLEANSTART-2026-TB62502, GHSA-88jx-383q-w4qc, GO-2024-2718

## 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 (Allocation of Resources Without Limits or Throttling)

## 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.


| Package | Ecosystem | Affected | Fixed in |
| --- | --- | --- | --- |
| `github.com/sigstore/cosign` | Go | All versions | None |
| `github.com/sigstore/cosign` | Go | All versions to 2.2.3 | None |
| `github.com/sigstore/cosign` | Go | All versions to 2.2.3 | None |
| `cosign` | Bitnami | All versions | 2.2.4 |
| `github.com/sigstore/cosign/v2` | Go | All versions | 2.2.4 |
| `github.com/sigstore/cosign/v2` | Go | All versions | 2.2.4 |
| `github.com/sigstore/cosign/v2` | Go | All versions | 2.2.4 |

Products: Sigstore Cosign.

## How do I fix CVE-2024-29902?

Upgrade to a fixed version.

## Is CVE-2024-29902 being exploited?

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

## Other vulnerabilities in sigstore cosign

- [CVE-2022-35929](https://insights.sbomify.com/CVE-2022-35929/): False positive signature verification in cosign (high 7.1)
- [CVE-2026-22703](https://insights.sbomify.com/CVE-2026-22703/): Cosign verification accepts any valid Rekor entry under certain conditions (medium 5.5)
- [CVE-2022-36056](https://insights.sbomify.com/CVE-2022-36056/): Vulnerabilities with blob verification in sigstore cosign (medium 5.5)
- [CVE-2026-39395](https://insights.sbomify.com/CVE-2026-39395/): Cosign's verify-blob-attestation reports false positive when payload parsing fails (medium 4.3)
- [CVE-2024-29903](https://insights.sbomify.com/CVE-2024-29903/): Cosign vulnerable to machine-wide denial of service via malicious artifacts (medium 4.2)

## Fix prompt for AI coding agents

```text
Check this codebase for CVE-2024-29902 and fix it if it is affected.

What it is: 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.
Exploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-29902 exists.

Affected packages and fixed versions:
- github.com/sigstore/cosign (Go): affected all versions; no fix listed
- github.com/sigstore/cosign (Go): affected all versions up to 2.2.3; no fix listed
- github.com/sigstore/cosign (Go): affected all versions up to 2.2.3; no fix listed
- cosign (Bitnami): affected all versions; fixed in 2.2.4
- github.com/sigstore/cosign/v2 (Go): affected all versions; fixed in 2.2.4
- github.com/sigstore/cosign/v2 (Go): affected all versions; fixed in 2.2.4
- github.com/sigstore/cosign/v2 (Go): affected all versions; fixed in 2.2.4

Task:
1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.
2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.
3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.
4. Run the tests and summarise what changed and why.
5. If nothing in the project is affected, say so and change nothing.

Reference: https://insights.sbomify.com/CVE-2024-29902/ (Markdown: https://insights.sbomify.com/CVE-2024-29902/index.md)
```

## Sources

- CVE record: https://www.cve.org/CVERecord?id=CVE-2024-29902
- NVD: https://nvd.nist.gov/vuln/detail/CVE-2024-29902
- OSV: https://osv.dev/vulnerability/CVE-2024-29902

---
From sbomify Insights: https://insights.sbomify.com/CVE-2024-29902/
Summaries are generated and may contain mistakes; the official description above is the record.
