7.5high
Minder's Github Webhook Handler vulnerable to denial of service from un-validated requests
- Severity
- 7.5high CVSS:3.1 by GitHub_M
- Exploit likelihood
- 0.87% (higher than 57% of CVEs)
- Published
- Last changed
- Assigned by
- GitHub_M
- Also known as
- GHSA-9c5w-9q3f-3hv7GO-2024-2821
Description
Minder's `HandleGithubWebhook` is susceptible to a denial of service attack from an untrusted HTTP request. The vulnerability exists before the request has been validated, and as such the request is still untrusted at the point of failure. This allows an attacker with the ability to send requests to `HandleGithubWebhook` to crash the Minder controlplane and deny other users from using it. This vulnerability is fixed in 0.0.48.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| stacklok minder | < 0.0.48, before 0.0.48 | CVE List |
| github.com/stacklok/minder (Go) | before 0.0.48 | GitHub Advisory Database, Go Vulnerability Database |
All scores
| GitHub_M | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
| GitHub | 7.5high CVSS:3.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H |
Classification
SSVC (CISA-ADP): exploitation poc, automatable yes, technical impact partial.
What each source says
CVE List
Minder's `HandleGithubWebhook` is susceptible to a denial of service attack from an untrusted HTTP request. The vulnerability exists before the request has been validated, and as such the request is still untrusted at the point of failure. This allows an attacker with the ability to send requests to `HandleGithubWebhook` to crash the Minder controlplane and deny other users from using it. This vulnerability is fixed in 0.0.48.
GitHub Advisory Database
Minder's HandleGithubWebhook is susceptible to a denial of service attack from an untrusted HTTP request. The vulnerability exists before the request has been validated, and as such the request is still untrusted at the point of failure. This allows an attacker with the ability to send requests to HandleGithubWebhook to crash the Minder controlplane and deny other users from using it.
One of the first things that HandleGithubWebhook does is to validate the payload signature. This is done by way of the internal helper validatePayloadSignature:
validatePayloadSignature generates a reader from the incoming request by way of the internal helper readerFromRequest:
To create a reader from the incoming request, readerFromRequest first reads the request body entirely into memory on line 368:
This is a vulnerability, since an HTTP request with a large body can exhaust the memory of the machine running Minder and cause the Go runtime to crash Minder.
Note that this occurs before Minder has validated the request, and as such, the request is still untrusted.
To test this out, we can use the existing TestHandleWebHookRepository unit test and modify the HTTP request body to be large.
To do that, change these lines:
... to these lines:
packageJson, err := json.Marshal(event)
require.NoError(t, err, "failed to marshal package event")
maliciousBody := strings.NewReader(strings.Repeat("1337", 1000000000))
maliciousBodyReader := io.MultiReader(maliciousBody, maliciousBody, maliciousBody, maliciousBody, maliciousBody)
_ = packageJson
client := &http.Client{}
req, err := http.NewRequest("POST", fmt.Sprintf("http://%s", addr), maliciousBodyReader)
require.NoError(t, err, "failed to create request")
Then run the unit test again. WARNING, SAVE ALL WORK BEFORE DOING THIS.
On my local machine, this causes the machine to freeze, and Go finally performs a sigkill:
signal: killed
FAIL github.com/stacklok/minder/internal/controlplane 30.759s
FAIL
Go Vulnerability Database
HandleGithubWebhook is susceptible to a denial of service attack from an untrusted HTTP request. An untrusted request can cause the server to allocate large amounts of memory resulting in a denial of service.
NVD (es)
El `HandleGithubWebhook` de Minder es susceptible a un ataque de denegación de servicio procedente de una solicitud HTTP que no es de confianza. La vulnerabilidad existe antes de que se haya validado la solicitud y, como tal, la solicitud aún no es confiable en el momento del error. Esto permite que un atacante con la capacidad de enviar solicitudes a "HandleGithubWebhook" bloquee el plano de control de Minder y niegue a otros usuarios su uso. Esta vulnerabilidad se solucionó en 0.0.48.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-34084 changed 2024-08-02 | CVE Terms of Use |
| GitHub Advisory Database | GHSA-9c5w-9q3f-3hv7 changed 2026-09-10 | CC-BY-4.0 |
| Go Vulnerability Database | GO-2024-2821 changed 2024-05-20 | CC-BY-4.0 |
| NVD | CVE-2024-34084 changed 2026-06-17 | Public domain |