# CVE-2024-29903: Cosign vulnerable to machine-wide denial of service via malicious artifacts

> Attackers can cause machine-wide denial of service in Cosign by submitting malicious artifacts that trigger excessive memory allocation.

- **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-29903, CLEANSTART-2026-TU54613, GHSA-95pr-fxf5-86gv, GO-2024-2719

## What is CVE-2024-29903?

CVE-2024-29903 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, 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. The exact issue is Cosign allocates excessive memory on the lines that creates a slice of the same length as the manifests. 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-29903?

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-29903?

Upgrade to a fixed version.

## Is CVE-2024-29903 being exploited?

It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-29903 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-29902](https://insights.sbomify.com/CVE-2024-29902/): Cosign vulnerable to system-wide denial of service via malicious attachments (medium 4.2)

## Fix prompt for AI coding agents

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

What it is: CVE-2024-29903 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-29903 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-29903/ (Markdown: https://insights.sbomify.com/CVE-2024-29903/index.md)
```

## Sources

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

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