diff --git a/docs/en/solutions/Nginx2Root_vulnerability_mitigation_on_ACP.md b/docs/en/solutions/Nginx2Root_vulnerability_mitigation_on_ACP.md new file mode 100644 index 000000000..99e5715d9 --- /dev/null +++ b/docs/en/solutions/Nginx2Root_vulnerability_mitigation_on_ACP.md @@ -0,0 +1,223 @@ +--- +products: + - Alauda Container Platform +kind: + - Solution +ProductsVersion: + - '3.6.x,3.12.x,3.16.x,4.0.x,4.1.x,4.2.x,4.3.x and later' +tags: + - LB +--- + +# Nginx2Root Vulnerability Handling on ACP + +## Issue + +Nginx2Root is a group of NGINX remote-code-execution vulnerabilities. ACP handling has two steps: + +1. Determine whether the CVE trigger exists in the ACP data plane. +2. For ACP versions before 4.3, the temporary mitigation for the affected HTTP/2 CVEs is disabling client-side HTTP/2. For ACP 4.3 and later, upgrade to the fixed patch release listed below. + +In this article, **system LB** means the ACP-provided default entry point. **User LB** includes user-created ALBs and Ingress NGINX instances deployed through the Ingress NGINX Operator. + +### ACP Impact Assessment + +The five reported CVEs and their applicability to the ACP data plane are: + +| CVE | Vulnerability trigger | ACP impact | Required action | +| --- | --- | --- | --- | +| `CVE-2026-123007` | HTTP/2 flow-control integer overflow | Potentially affects ALB and user Ingress NGINX before the fixed ACP releases when HTTP/2 is enabled | Upgrade; for ACP before 4.3, temporarily disable HTTP/2 | +| `CVE-2026-123633` | HTTP/2 connection-draining UAF during reverse proxying | Potentially affects ALB and user Ingress NGINX before the fixed ACP releases when HTTP/2 is enabled | Upgrade; for ACP before 4.3, temporarily disable HTTP/2 | +| `CVE-2026-123634` | `resolver` + variable-form `proxy_pass` + `mirror` | Not applicable to ACP ALB because ALB does not use `mirror`; user Ingress NGINX is conditional on its generated configuration | Check only user Ingress NGINX instances that may contain custom mirror rules | +| `CVE-2026-121810` | HTTP/3/QUIC UAF | Not applicable to the standard ACP ALB or Ingress NGINX data plane because HTTP/3/QUIC is not enabled | No ACP LB change; investigate separately only if a customer added a QUIC listener | +| `CVE-2026-113425` | `auth_http` UAF in the mail module | Not applicable because ACP ALB and Ingress NGINX do not expose mail listeners or enable the mail module | No ACP LB change | + +Only the two HTTP/2 CVEs require the temporary LB configuration changes in this article. The other CVEs do not need a generic ACP repair procedure when their trigger is absent. + +#### Check user Ingress NGINX for CVE-2026-123634 + +Inspect the generated NGINX configuration from the actual Controller Pod rather than only the Ingress YAML. The effective configuration can include snippets and templates added by the Operator. + +```bash +export CONTROLLER_NAMESPACE="replace-with-namespace" +kubectl -n "${CONTROLLER_NAMESPACE}" get pods +export CONTROLLER_POD="replace-with-controller-pod-name" +export NGINX_CONFIG="./${CONTROLLER_POD}-nginx.txt" +kubectl -n "${CONTROLLER_NAMESPACE}" exec "${CONTROLLER_POD}" -c controller -- \ + nginx -T > "${NGINX_CONFIG}" +grep -nE '(^|[[:space:]])resolver[[:space:]]|(^|[[:space:]])mirror(_request_body)?[[:space:]]|proxy_pass[[:space:]]+[^;]*\$' \ + "${NGINX_CONFIG}" +``` + +Replace the namespace and Pod name with the Controller Pod for the user Ingress NGINX instance being assessed. + +Treat the instance as potentially affected only when a request path uses a `mirror` directive and the relevant configuration also uses a `resolver` with a variable-form `proxy_pass`. A `mirror_request_body` directive alone is not sufficient. If the generated configuration contains no `mirror` directive, this CVE is not applicable to that instance. + +## Environment + +This solution applies to ACP installations with system or user ALBs, and to user Ingress NGINX instances on ACP 4.1.2–4.2. The NGINX version delivered before the fixed releases varies by ACP release and LB component. The following fixed ACP releases contain NGINX `1.31.9` and are not affected by the reported Nginx2Root CVEs: + +| ACP release line | First fixed release | Action | +| --- | --- | --- | +| 4.3 | `4.3.4` | Upgrade ACP 4.3.0–4.3.3 to `4.3.4` or later | +| 4.4 | `4.4.2` | Upgrade ACP 4.4.0–4.4.1 to `4.4.2` or later | +| 4.5 | `4.5.1` | Upgrade ACP 4.5.0 to `4.5.1` or later | + +## Resolution + +### Upgrade ACP 4.3 and Later + +Upgrade to the fixed release for the corresponding ACP line in the table above. After upgrading, no HTTP/2 configuration workaround is required. + +### Temporarily Disable HTTP/2 Before ACP 4.3 + +For ACP versions before 4.3, disable client-side HTTP/2 on both system LBs and user LBs while preparing the upgrade. The configuration entry depends on the release and deployment mechanism: + +| ACP release | System ALB | User LB | HTTP/2 setting | +| --- | --- | --- | --- | +| Before `3.12` (including 3.6) | Update the ALB template in the `cluster-module-config` ConfigMap and restart base-operator | Update the user ALB HR in the global cluster | Set `enableHTTP2` to the string `"false"` in the respective template or HR values | +| `3.12` to before `4.0` | ALB CR | ALB CR | Set `spec.config.enableHTTP2` to the string `"false"` on each ALB CR | +| `4.0`–`4.2` | Update the global-cluster ModuleInfo `spec.valuesOverride` for `acp/chart-alauda-alb2` | ALB CR | Set `enableHTTP2` to the string `"false"` in ModuleInfo values or `spec.config` on a user ALB CR | +| User Ingress NGINX on `4.1.2`–`4.2` | Use the system ALB procedure above | `IngressNginx` CR | Set `spec.controller.config.use-http2` to the string `"false"` | + +### ALB Mitigation + +#### ALB CR on ACP 3.12–4.2 + +On ACP 3.12 to before 4.0, update both system and user ALB CRs. On ACP 4.0–4.2, update only user ALB CRs; the system ALB is configured through ModuleInfo as described below. List the ALBs to identify each instance: + +```bash +export ALB_NAMESPACE="replace-with-namespace" +export ALB_NAME="replace-with-alb-name" +kubectl get alaudaloadbalancer2 -A +kubectl -n "${ALB_NAMESPACE}" patch alaudaloadbalancer2 "${ALB_NAME}" --type merge \ + -p '{"spec":{"config":{"enableHTTP2":"false"}}}' +``` + +Check that the value is persisted and that the generated HTTPS listener no longer contains `http2`: + +```bash +kubectl -n "${ALB_NAMESPACE}" get alaudaloadbalancer2 "${ALB_NAME}" \ + -o jsonpath='{.spec.config.enableHTTP2}{"\n"}' +kubectl -n "${ALB_NAMESPACE}" exec "deploy/${ALB_NAME}" -c nginx -- \ + sh -c 'nginx -T 2>/dev/null | grep -n "http2"' +``` + +Replace the namespace and ALB name with the instance being updated. Use the actual data-plane Deployment name if it differs from `deploy/${ALB_NAME}`. The generated configuration check is only one part of validation; also verify the TLS ALPN result below. + +#### System ALB on ACP 4.0–4.2 + +In the global cluster, locate the ModuleInfo for the system ALB and edit it: + +```bash +kubectl get minfo -l cpaas.io/module-name=alb +export MODULEINFO_NAME="replace-with-system-alb-moduleinfo-name" +kubectl edit minfo "${MODULEINFO_NAME}" +``` + +Add or update `enableHTTP2` under the existing chart values override, preserving the other values: + +```yaml +spec: + valuesOverride: + acp/chart-alauda-alb2: + enableHTTP2: "false" +``` + +Verify that the generated system ALB configuration no longer negotiates HTTP/2. A direct edit to the system ALB CR may be overwritten by the platform's ModuleInfo reconciliation. + +#### System ALB before ACP 3.12 + +The system ALB is not configured through a user ALB HR. In the global cluster, inspect the `cpaas-system` ConfigMaps named `cluster-module-config` or `cluster-module-config-v`. Edit the ConfigMap containing the ALB template for the affected cluster, set `enableHTTP2: "false"` in that template's existing chart values, and restart base-operator to regenerate the system ALB: + +```bash +kubectl -n cpaas-system get cm +export CONFIGMAP_NAME="replace-with-cluster-module-config-name" +kubectl -n cpaas-system edit cm "${CONFIGMAP_NAME}" +``` + +Check the regenerated ALB's `ENABLE_HTTP2` value and TLS ALPN result. The exact template key depends on the deployed ACP version; preserve the existing structure rather than replacing the entire ConfigMap. Arrange the base-operator restart according to the platform's maintenance procedure. + +#### User ALB before ACP 3.12 + +The 3.6 ALB chart defaults `enableHTTP2` to `"true"`. The Deployment passes this value to the container as `ENABLE_HTTP2`, and the NGINX template adds `http2` to the HTTPS `listen` directive when the value is true. Change the HR that owns the ALB instead of editing the Deployment environment directly. + +In the global cluster, find the user ALB HR in the `cpaas-system` namespace. The HR name follows the platform-generated cluster and ALB naming convention: + +```bash +kubectl -n cpaas-system get hr +export HR_NAME="replace-with-user-alb-hr-name" +kubectl -n cpaas-system edit hr "${HR_NAME}" +``` + +Add or update this key under the existing `spec.values`: + +```yaml +spec: + values: + enableHTTP2: "false" +``` + +Wait for the HR to render the ALB again, then check `ENABLE_HTTP2` and the generated NGINX configuration in the ALB Pod. Do not rely on `kubectl edit deploy` or `kubectl set env`; HR reconciliation or a platform upgrade will overwrite those changes. + +### Ingress NGINX Mitigation + +#### IngressNginx CR on ACP 4.1.2–4.2 + +List all platform-managed Ingress NGINX instances and update each user LB instance: + +```bash +kubectl get ingressnginxes.ingress-nginx.alauda.io -A +export INGRESS_NGINX_NAMESPACE="replace-with-namespace" +export INGRESS_NGINX_NAME="replace-with-ingress-nginx-name" +kubectl -n "${INGRESS_NGINX_NAMESPACE}" patch ingressnginx "${INGRESS_NGINX_NAME}" --type merge \ + -p '{"spec":{"controller":{"config":{"use-http2":"false"}}}}' +``` + +The equivalent YAML is: + +```yaml +spec: + controller: + config: + use-http2: "false" +``` + +The Operator synchronizes this configuration to the generated Controller ConfigMap and reloads the data plane. Confirm the generated ConfigMap: + +```bash +kubectl -n "${INGRESS_NGINX_NAMESPACE}" get cm \ + "${INGRESS_NGINX_NAME}-ingress-nginx-controller" -o yaml +``` + +## Validation and Impact + +### Verify that HTTP/2 is not negotiated + +Check ALPN on the HTTPS VIP. After HTTP/2 is disabled, the endpoint must not negotiate `h2`; depending on the client and TLS configuration, the output may be `No ALPN negotiated` or HTTP/1.1. + +```bash +export VIP="replace-with-https-vip" +export HOST="replace-with-hostname" +echo | openssl s_client -connect "${VIP}:443" -servername "${HOST}" -alpn h2 2>/dev/null \ + | grep -i alpn +curl -vk --http1.1 "https://${HOST}/" -o /dev/null +``` + +Also confirm that: + +- The HTTP/2 setting is persisted in the ALB2/IngressNginx CR or HR. +- The data-plane Pod has reloaded or rolled out and old connections have drained. +- The business URL works over HTTP/1.1 and Host routing and certificate selection are unchanged. +- Any gRPC, `grpcs`, or other HTTP/2-only workload has a separate acceptance check. + +### Business impact + +This change disables client-to-LB HTTPS HTTP/2 negotiation. HTTP/2-only clients and gRPC/`grpcs` entry points may stop working; ordinary HTTP/HTTPS requests fall back to HTTP/1.1. Inventory gRPC workloads on both system and user LBs and schedule a rollback window before applying the change. + +## Scope Boundaries + +- This article covers ALB and Ingress NGINX delivered or managed by ACP, including temporary Nginx2Root mitigation and the upgrade path. +- NGINX inside a customer-managed application image is not changed by disabling platform LB HTTP/2. The application owner must inventory and upgrade it separately. +- The generic temporary mitigation in this article applies only to the two HTTP/2-dependent CVEs. The conditional `CVE-2026-123634` check for user Ingress NGINX is described in the impact assessment above; the other two CVEs are outside the standard ACP LB configuration. +- System ALB templates and user ALB HR values on versions before 3.12 may be re-rendered during later upgrades. Recheck `enableHTTP2` and the generated NGINX configuration after every upgrade.