Описание
Traefik: HTTP/3 mTLS bypass via exact SNI TLSOptions lookup for wildcard and mixed-case hosts
Summary
There is a critical vulnerability in Traefik's HTTP/3 (QUIC) TLS configuration selection that allows unauthenticated clients to bypass router-specific mTLS enforcement. When HTTP/3 is enabled on an entrypoint, the TLS handshake selects the applicable TLS configuration through an exact, case-sensitive lookup on the SNI value, which fails to match wildcard host patterns (e.g., *.example.com) or case variants of the configured hostname. Because the handshake falls back to the default TLS configuration — which may not require client certificates — a client can complete the QUIC handshake without presenting a certificate, while the subsequent HTTP routing layer still dispatches the request to a backend protected by a router-specific mTLS policy. The issue affects deployments where HTTP/3 is enabled, a router uses a wildcard Host rule or case-insensitive hostname matching, a router-specific TLSOptions enforces client certificate authentication, and UDP access to the entrypoint is reachable by an attacker.
Patches
For more information
If you have any questions or comments about this advisory, please open an issue.
Original Description
Summary
Traefik's HTTP/3 TLS configuration selection can ignore router-specific TLSOptions and allow unauthenticated clients to bypass mTLS. The QUIC/HTTP3 path resolves TLS configuration with Router.GetTLSGetClientInfo(), which performs a direct, case-sensitive map lookup on hostHTTPTLSConfig[info.ServerName].
This is inconsistent with the later HTTP host routing semantics, where the same request host can still match wildcard or case-insensitive Host rules after the HTTP/3 TLS handshake has already fallen back to the default TLS configuration. Two exploit paths are confirmed:
Host("*.example.com")withtls.options=mtls: HTTP/2 requires a client certificate, but HTTP/3 reaches the protected backend without one.Host("api.example.com")withtls.options=mtls: HTTP/2 requires a client certificate, but HTTP/3 with mixed-case SNI/Host such asAPI.EXAMPLE.COMreaches the protected backend without one.
Confirmed versions:
- wildcard HTTP/3 bypass:
v3.7.0,v3.7.1 - exact-host mixed-case HTTP/3 bypass:
v3.6.17,v3.7.0,v3.7.1
Details
HTTP/3 installs a QUIC TLS callback in pkg/server/server_entrypoint_tcp_http3.go:
The callback is wired to the TCP router's TLS selector:
The selector in pkg/server/router/tcp/router.go only performs an exact map lookup:
That creates two mismatches:
- wildcard keys such as
*.example.comare never matched forapi.example.com - lower-case router keys such as
api.example.comare not matched for mixed-case SNI such asAPI.EXAMPLE.COM
On the later HTTP request path, the same host can still match wildcard or case-insensitive Host rules through the muxer. The HTTP/3 TLS handshake path falls back to the default TLS config before that routing decision happens. If the default TLS config does not require a client certificate, the QUIC handshake succeeds without mTLS, and the later HTTP router still routes to the protected backend.
Preconditions:
- HTTP/3 is enabled on the affected entrypoint.
- A router-specific
TLSOptionsconfiguration enforces client certificate authentication. - The default/fallback TLS configuration does not require client certificates.
- UDP access to the HTTP/3 entrypoint is reachable by the attacker.
Minimal wildcard dynamic configuration:
Minimal exact-host dynamic configuration:
Minimal Docker Compose:
Certificate generation:
The mixed-case HTTP/3 client used for the exact-host case:
PoC
Wildcard bypass:
- Start Traefik with the wildcard dynamic configuration above.
- Control over TCP/TLS:
Observed result:
- HTTP/3 bypass:
Observed result:
Exact-host mixed-case bypass:
- Start Traefik with the exact-host dynamic configuration above.
- Control over TCP/TLS:
Observed result:
- Mixed-case HTTP/2 control:
Observed result:
This control confirms that the bypass is specific to the HTTP/3 TLS configuration selection path in this test setup. The HTTP/2 request to the same mixed-case hostname still fails with certificate required.
- HTTP/3 bypass with the same mixed-case hostname:
Observed result:
Local regression tests used during validation:
These tests were added locally during analysis to demonstrate the current behavior of GetTLSGetClientInfo(). They are not required to reproduce the issue; the Docker and curl/HTTP3 commands above are the end-to-end reproduction.
Version matrix observed with Docker images:
The wildcard case was tested on v3.7.x because wildcard Host / HostSNI matching and TLSOptions association for wildcard domains were introduced in v3.7.0.
Impact
Deployments that use router TLSOptions as an access-control boundary for HTTP/3 can expose protected backends without client authentication.
The highest-impact case is mTLS:
- normal HTTP/2/TCP access to the protected host requires a client certificate
- HTTP/3 access to the same route falls back to the default TLS config
- the request is then routed to the protected backend without satisfying the route's mTLS policy
This can expose confidential data or privileged backend operations to unauthenticated network clients. The issue is especially severe because it does not require credentials, user interaction, or a prior foothold.
Possible workarounds until a fix is available:
- Disable HTTP/3 on entrypoints that rely on router-specific mTLS.
- Enforce mTLS in the default TLS options as well, so fallback TLS configuration is not weaker than router-specific configuration.
- Block UDP access to the HTTP/3 entrypoint.
- Enforce client authentication at an additional layer behind Traefik.
Пакеты
Traefik
<= 3.7.2
3.7.3
github.com/traefik/traefik/v2
<= 2.11.50
Отсутствует
github.com/traefik/traefik
<= 1.7.34
Отсутствует
Связанные уязвимости
Traefik is an HTTP reverse proxy and load balancer. Prior to 3.7.3, there is a critical vulnerability in Traefik's HTTP/3 (QUIC) TLS configuration selection that allows unauthenticated clients to bypass router-specific mTLS enforcement. When HTTP/3 is enabled on an entrypoint, the TLS handshake selects the applicable TLS configuration through an exact, case-sensitive lookup on the SNI value, which fails to match wildcard host patterns (e.g., *.example.com) or case variants of the configured hostname. Because the handshake falls back to the default TLS configuration — which may not require client certificates — a client can complete the QUIC handshake without presenting a certificate, while the subsequent HTTP routing layer still dispatches the request to a backend protected by a router-specific mTLS policy. The issue affects deployments where HTTP/3 is enabled, a router uses a wildcard Host rule or case-insensitive hostname matching, a router-specific TLSOptions enforces client ...
Traefik is an HTTP reverse proxy and load balancer. Prior to 3.7.3, there is a critical vulnerability in Traefik's HTTP/3 (QUIC) TLS configuration selection that allows unauthenticated clients to bypass router-specific mTLS enforcement. When HTTP/3 is enabled on an entrypoint, the TLS handshake selects the applicable TLS configuration through an exact, case-sensitive lookup on the SNI value, which fails to match wildcard host patterns (e.g., *.example.com) or case variants of the configured hostname. Because the handshake falls back to the default TLS configuration — which may not require client certificates — a client can complete the QUIC handshake without presenting a certificate, while the subsequent HTTP routing layer still dispatches the request to a backend protected by a router-specific mTLS policy. The issue affects deployments where HTTP/3 is enabled, a router uses a wildcard Host rule or case-insensitive hostname matching, a router-specific TLSOptions enforces client cer
Traefik is an HTTP reverse proxy and load balancer. Prior to 3.7.3, th ...