🇰🇷 한글 설명
Traefik의 Kubernetes ingress-nginx 프로바이더에서 인증 어노테이션과 리다이렉트 어노테이션이 동시에 설정된 경우, 보안 미들웨어가 적용되지 않은 별도의 '형제' 라우터가 생성되는 취약점입니다. 공격자가 특정 포트 형식을 사용하여 요청을 보내면 인증 및 IP 허용 목록을 우회하여 보호된 백엔드 서비스에 직접 접근할 수 있습니다.
💡 쉬운 설명
보안 검사 장치를 거쳐야 하는 문 옆에, 검사 장치가 없는 뒷문이 자동으로 만들어지는 오류입니다. 공격자가 특수한 주소를 입력하면 이 뒷문을 통해 보안 검사를 모두 건너뛰고 내부 시스템에 침입할 수 있습니다.
🇺🇸 원문 (English)
Traefik is a HTTP reverse proxy and load balancer. In versions >= v3.7.0 and <= v3.7.11, the Kubernetes ingress-nginx provider mishandles Ingresses that carry both an authentication annotation and the nginx.ingress.kubernetes.io/from-to-www-redirect annotation. For such Ingresses the provider creates an additional 'sibling' router that matches on the host alone, carries only the RedirectRegex middleware, and still points at the parent router's protected backend service. Because RedirectRegex is not a terminal handler, a request its pattern does not match is forwarded to the backend, and because the redirect pattern only accepts a numeric port while Traefik's host matcher canonicalizes the authority via net.SplitHostPort, a request with a non-numeric or empty port (for example 'Host: www.example.com:x') selects the sibling router, misses the redirect, and is proxied to the protected backend with none of the Ingress's annotation-derived middlewares applied. This discards not only authentication (e.g. BasicAuth) but every annotation-derived middleware, including source-IP allowlisting. Traefik v2 and v3 releases before v3.7.0 are not affected. The issue is fixed in v3.7.12.
📍 영향받는 시스템
Traefik v3.7.0 이상 v3.7.11 이하 버전
⚔️ 공격 벡터
비숫자형 또는 빈 포트(예: Host: www.example.com:x)를 포함한 HTTP 요청을 통해 인증 미들웨어를 우회하여 접근
🛡️ 대응 방법
Traefik을 v3.7.12 이상의 버전으로 업데이트
🔧 검증 코드
출력된 버전이 v3.7.0 이상 v3.7.11 이하인 경우 취약한 상태입니다.
traefik version | grep -E 'v3\[\.\d+\.\d+\]'