Severity: Medium
Component: Webhook Interceptor (server/auth/webhook)
Vulnerability Type: Denial of Service (DoS)
The Webhook Interceptor loads the entire request body into memory before authenticating the request or verifying its signature. This occurs on the /api/v1/events/ endpoint, which is publicly accessible (albeit intended for webhooks). An attacker can send a request with an extremely large body (e.g., multiple gigabytes), causing the Argo Server to allocate excessive memory, potentially leading to an Out-Of-Memory (OOM) crash and denial of service.
In server/auth/webhook/interceptor.go:
func (i *WebhookInterceptor) addWebhookAuthorization(r *http.Request, kube kubernetes.Interface) error {
// ... basic checks ...
// Vulnerability: Reads entire body into memory unconditionally
buf, _ := io.ReadAll(r.Body)
defer func() { r.Body = io.NopCloser(bytes.NewBuffer(buf)) }()
// ... subsequent logic finds correct service account and secret ...
// ... verification happens later ...
}
The io.ReadAll call happens before the signature verification loop.
POST /api/v1/events/some-namespaceContent-Length: 1000000000 (1GB) header.http.MaxBytesReader.{
"cwe_ids": [
"CWE-770"
],
"github_reviewed": true,
"github_reviewed_at": "2026-05-04T20:11:01Z",
"nvd_published_at": "2026-05-09T04:16:24Z",
"severity": "HIGH"
}