File tree 1 file changed +12
-3
lines changed
1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -159,13 +159,22 @@ func main() {
159
159
log .Fatalf ("Failed to initialize certificate watcher: %v" , err )
160
160
}
161
161
162
+ tlsOpts := func (config * tls.Config ) {
163
+ config .GetCertificate = cw .GetCertificate
164
+ // Ensure HTTP/2 is disabled by default for webhooks. Disabling HTTP/2 mitigates vulnerabilities associated with:
165
+ // - HTTP/2 Stream Cancellation (GHSA-qppj-fm5r-hxr3)
166
+ // - HTTP/2 Rapid Reset (GHSA-4374-p667-p6c8)
167
+ // While CVE fixes exist, they remain insufficient; disabling HTTP/2 helps reduce risks.
168
+ // For details, see: https://github.com/kubernetes/kubernetes/issues/121197
169
+ setupLog .Info ("disabling http/2" )
170
+ config .NextProtos = []string {"http/1.1" }
171
+ }
172
+
162
173
// Create webhook server and configure TLS
163
174
webhookServer := crwebhook .NewServer (crwebhook.Options {
164
175
Port : webhookPort ,
165
176
TLSOpts : []func (* tls.Config ){
166
- func (cfg * tls.Config ) {
167
- cfg .GetCertificate = cw .GetCertificate
168
- },
177
+ tlsOpts ,
169
178
},
170
179
})
171
180
You can’t perform that action at this time.
0 commit comments