Skip to content

Commit 119861e

Browse files
ihcsimjillian-maroket
authored andcommitted
Add 1.5 and 1.4.3 instructions to revert CVE-2025-1974 workaround
Signed-off-by: Ivan Sim <[email protected]> Co-authored-by: Jillian Maroket <[email protected]> Signed-off-by: Ivan Sim <[email protected]>
1 parent 94dff83 commit 119861e

File tree

2 files changed

+124
-0
lines changed

2 files changed

+124
-0
lines changed

docs/upgrade/automatic.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,65 @@ When upgrading to Harvester **v1.4.x**, Longhorn Manager may crash if the `Evict
188188
To prevent the issue from occurring, ensure that the `EvictionRequested` flag is set to `false` before you start the upgrade process.
189189
190190
:::
191+
192+
## Re-enable RKE2 ingress-nginx Admission Webhooks (CVE-2025-1974)
193+
194+
If you [disabled the RKE2 ingress-nginx admission webhooks](https://harvesterhci.io/kb/2025/03/25/cve-2025-1974) to mitigate [CVE-2025-1974](https://nvd.nist.gov/vuln/detail/CVE-2025-1974), you must re-enable the webhook after upgrading to Harvester v1.5.0 or later.
195+
196+
1. Confirm that Harvester is using nginx-ingress v1.12.1 or later.
197+
198+
```sh
199+
$ kubectl -n kube-system get po -l"app.kubernetes.io/name=rke2-ingress-nginx" -ojsonpath='{.items[].spec.containers[].image}'
200+
rancher/nginx-ingress-controller:v1.12.1-hardened1
201+
```
202+
203+
1. Run `kubectl -n kube-system edit helmchartconfig rke2-ingress-nginx` to **remove** the following configurations from the `HelmChartConfig` resource.
204+
205+
* `.spec.valuesContent.controller.admissionWebhooks.enabled: false`
206+
* `.spec.valuesContent.controller.extraArgs.enable-annotation-validation: true`
207+
208+
1. Verify that the new `.spec.ValuesContent` configuration is similar to the following example.
209+
210+
```yaml
211+
apiVersion: helm.cattle.io/v1
212+
kind: HelmChartConfig
213+
metadata:
214+
name: rke2-ingress-nginx
215+
namespace: kube-system
216+
spec:
217+
valuesContent: |-
218+
controller:
219+
admissionWebhooks:
220+
port: 8444
221+
extraArgs:
222+
default-ssl-certificate: cattle-system/tls-rancher-internal
223+
config:
224+
proxy-body-size: "0"
225+
proxy-request-buffering: "off"
226+
publishService:
227+
pathOverride: kube-system/ingress-expose
228+
```
229+
230+
:::info important
231+
If the `HelmChartConfig` resource contains other custom ingress-nginx configuration, you must retain them when editing the resource.
232+
:::
233+
234+
1. Exit the `kubectl edit` command execution to save the configuration.
235+
236+
Harvester automatically applies the change once the content is saved.
237+
238+
1. Verify that the `rke2-ingress-nginx-admission` webhook configuration is re-enabled.
239+
240+
```sh
241+
$ kubectl get validatingwebhookconfiguration rke2-ingress-nginx-admission
242+
NAME WEBHOOKS AGE
243+
rke2-ingress-nginx-admission 1 6s
244+
```
245+
246+
1. Verify that the ingress-nginx pods are restarted successfully.
247+
248+
```sh
249+
kubectl -n kube-system get po -lapp.kubernetes.io/instance=rke2-ingress-nginx
250+
NAME READY STATUS RESTARTS AGE
251+
rke2-ingress-nginx-controller-l2cxz 1/1 Running 0 94s
252+
```

versioned_docs/version-v1.4/upgrade/automatic.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,3 +183,65 @@ When upgrading to Harvester **v1.4.x**, Longhorn Manager may crash if the `Evict
183183
To prevent the issue from occurring, ensure that the `EvictionRequested` flag is set to `false` before you start the upgrade process.
184184
185185
:::
186+
187+
## CVE-2025-1974: Re-enable RKE2 ingress-nginx Admission Webhooks
188+
189+
If you have previously [disabled the RKE2 ingress-nginx admission webhook](https://harvesterhci.io/kb/2025/03/25/cve-2025-1974) due to [CVE-2025-1974](https://nvd.nist.gov/vuln/detail/CVE-2025-1974), you will need to re-enable it after upgrading to Harvester v1.4.3 or later with the following steps:
190+
191+
1. Confirm that Harvester is using nginx-ingress v1.12.1 or later.
192+
193+
```sh
194+
$ kubectl -n kube-system get po -l"app.kubernetes.io/name=rke2-ingress-nginx" -ojsonpath='{.items[].spec.containers[].image}'
195+
rancher/nginx-ingress-controller:v1.12.1-hardened1
196+
```
197+
198+
1. Use `kubectl -n kube-system edit helmchartconfig rke2-ingress-nginx` to **remove** the following configurations from the resource.
199+
200+
* `.spec.valuesContent.controller.admissionWebhooks.enabled: false`
201+
* `.spec.valuesContent.controller.extraArgs.enable-annotation-validation: true`
202+
203+
1. The following is an example of what the new `.spec.ValuesContent` configuration should look like.
204+
205+
```yaml
206+
apiVersion: helm.cattle.io/v1
207+
kind: HelmChartConfig
208+
metadata:
209+
name: rke2-ingress-nginx
210+
namespace: kube-system
211+
spec:
212+
valuesContent: |-
213+
controller:
214+
admissionWebhooks:
215+
port: 8444
216+
extraArgs:
217+
default-ssl-certificate: cattle-system/tls-rancher-internal
218+
config:
219+
proxy-body-size: "0"
220+
proxy-request-buffering: "off"
221+
publishService:
222+
pathOverride: kube-system/ingress-expose
223+
```
224+
225+
:::info important
226+
If the `HelmChartConfig` resource contains other custom ingress-nginx configuration, you must retain them when editing the resource.
227+
:::
228+
229+
1. Exit the `kubectl edit` command execution to save the configuration.
230+
231+
Harvester automatically applies the change once the content is saved.
232+
233+
1. Verify that the `rke2-ingress-nginx-admission` webhook configuration is re-enabled.
234+
235+
```sh
236+
$ kubectl get validatingwebhookconfiguration rke2-ingress-nginx-admission
237+
NAME WEBHOOKS AGE
238+
rke2-ingress-nginx-admission 1 6s
239+
```
240+
241+
1. Verify that the ingress-nginx pods are restarted successfully.
242+
243+
```sh
244+
kubectl -n kube-system get po -lapp.kubernetes.io/instance=rke2-ingress-nginx
245+
NAME READY STATUS RESTARTS AGE
246+
rke2-ingress-nginx-controller-l2cxz 1/1 Running 0 94s
247+
```

0 commit comments

Comments
 (0)