Skipper: Unbounded Request Body Read in Admission Webhook Causes Memory Exhaustion DoS
위협 신호 · CVSS · EPSS · KEV
이론적 심각도 점수
예측 데이터 없음
실측 악용 기록 없음
계획된 패치 주기 내 조치(60일 이내)
CVSS 벡터 · 메트릭
CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:L상세 설명
Summary
The Kubernetes admission webhook handler reads the entire request body using io.ReadAll(r.Body) without any size limit. Any client that can reach the webhook port within the cluster can send a multi-GB payload, causing the skipper process to exhaust memory and be OOM-killed. This disrupts all Kubernetes admission control, potentially blocking all pod creation and updates.
Vulnerable Code
1// dataclients/kubernetes/admission/admission.go:76 2body, err := io.ReadAll(r.Body) // <-- NO SIZE LIMIT 3if err != nil { 4 log.Errorf("Failed to read request: %v", err) 5 w.WriteHeader(http.StatusInternalServerError) 6 invalidRequests.WithLabelValues(admitterName).Inc() 7 return 8} 9 10var review admissionReview11err = json.Unmarshal(body, &review)For comparison, the OPA filter has a body size limit:
1// filters/openpolicyagent/openpolicyagent.go:68-70 2const DefaultMaxRequestBodySize = 1 << 20 // 1MB 3 4// OPA uses a bufferedBodyReader with size limitsAttack Path
- Attacker identifies the admission webhook endpoint (default:
:9443/admissionor configured path) - Attacker sends:
POST /admission HTTP/1.1, Content-Type: application/jsonwith a multi-GB request body io.ReadAll(r.Body)allocates unbounded memory for the entire body- Skipper process is OOM-killed by the Kubernetes kubelet
Permission Boundary Analysis
- Attacker: Any client with network access to the admission webhook port within the Kubernetes cluster
- Boundary crossed: Memory safety — unbounded allocation from attacker-controlled input
- Preconditions: Admission webhook endpoint must be network-reachable (default Kubernetes deployment exposes it within cluster network)
- Comparison: OPA filter has
DefaultMaxRequestBodySize(1MB) and semaphore-based memory limit; admission handler has neither
Evidence
| File | Lines | Description |
|---|---|---|
dataclients/kubernetes/admission/admission.go | 76 | io.ReadAll(r.Body) without size limit |
filters/openpolicyagent/openpolicyagent.go | 68-70 | OPA filter has DefaultMaxRequestBodySize = 1MB |
filters/openpolicyagent/openpolicyagent.go | 1333-1336 | OPA uses bufferedBodyReader with size limits |
Tests
dataclients/kubernetes/admission/admission_test.goexists but does not test body size limits
Impact
The admission webhook handler reads the entire request body using io.ReadAll(r.Body) without a size limit. An attacker with in-cluster network access and a valid Kubernetes client certificate can send a multi-GB payload to the webhook endpoint, causing the skipper process to exhaust memory and be OOM-killed. This disrupts admission control for Ingress and RouteGroup resources until the process is automatically restarted by the kubelet.
Scope of impact: Ingress and RouteGroup admission only — not pod creation or other admission controllers.
Recovery: Kubernetes automatically restarts the OOM-killed process, limiting downtime.
Prerequisites: (1) In-cluster network access to the webhook port, (2) valid Kubernetes client certificate.
Mitigation
- Add
http.MaxBytesReaderor equivalent body size limit beforeio.ReadAll - Follow the OPA filter pattern: define
DefaultMaxRequestBodySizeand use a buffered reader with size limits - Add a configurable
--admission-max-body-sizeflag
AI 심층 분석
공격 시나리오 · 재현 가능한 PoC 페이로드 · 즉시 적용 가능한 차단 패치를 한 번에 받아 보세요. 보안 운영팀이 그대로 점검·티켓팅에 쓸 수 있는 형태로 정리해 드립니다.