CVE-2024-35238 Denial of service of Minder Server from maliciously crafted GitHub attestations

Medium 5.3 Published Updated

An attacker can crash the Minder server by forcing it to fetch a maliciously large GitHub attestation response, causing a denial of service.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Over the internet
Victim action needed
Not needed
Fix
Available

What is CVE-2024-35238?

CVE-2024-35238 is a medium-severity denial of service vulnerability in stacklok minder, published on 27 May 2024. Any signed-in user can exploit it over the network, with no action from the victim.

Official description

Minder by Stacklok is an open source software supply chain security platform. Minder prior to version 0.0.51 is vulnerable to a denial-of-service (DoS) attack which could allow an attacker to crash the Minder server and deny other users access to it. The root cause of the vulnerability is that Minders sigstore verifier reads an untrusted response entirely into memory without enforcing a limit on the response body. An attacker can exploit this by making Minder make a request to an attacker-controlled endpoint which returns a response with a large body which will crash the Minder server. Specifically, the point of failure is where Minder parses the response from the GitHub attestations endpoint in `getAttestationReply`. Here, Minder makes a request to the `orgs/$owner/attestations/$checksumref` GitHub endpoint (line 285) and then parses the response into the `AttestationReply` (line 295). The way Minder parses the response on line 295 makes it prone to DoS if the response is large enough. Essentially, the response needs to be larger than the machine has available memory. Version 0.0.51 contains a patch for this issue.

The content that is hosted at the `orgs/$owner/attestations/$checksumref` GitHub attestation endpoint is controlled by users including unauthenticated users to Minders threat model. However, a user will need to configure their own Minder settings to cause Minder to make Minder send a request to fetch the attestations. The user would need to know of a package whose attestations were configured in such a way that they would return a large response when fetching them. As such, the steps needed to carry out this attack would look as such:

1. The attacker adds a package to ghcr.io with attestations that can be fetched via the `orgs/$owner/attestations/$checksumref` GitHub endpoint. 2. The attacker registers on Minder and makes Minder fetch the attestations. 3. Minder fetches attestations and crashes thereby being denied of service.

Weakness: CWE-770

Which versions are affected by CVE-2024-35238?

3 open source packages ship an affected version, including github.com/stacklok/minder.

PackageAffectedFixed in
github.com/stacklok/minder GoAll versions0.0.51
github.com/stacklok/minder GoAll versions0.0.51
github.com/stacklok/minder GoAll versions0.0.51

How do I fix CVE-2024-35238?

Upgrade github.com/stacklok/minder to 0.0.51 or later.

Upgrade, then put limits on request size, rate and nesting depth so one client cannot exhaust the service. More about Denial of service.

Is CVE-2024-35238 being exploited?

There is no known exploitation of CVE-2024-35238 in the wild and no public exploit code.

Sources

Also known as GHSA-8fmj-33gw-g7pw, GO-2024-2885.

Is CVE-2024-35238 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free