CVE-2026-54764: Traefik: ForwardAuth middleware leaks X-Forwarded-Port spoofing via untrusted X-Forwarded-Proto when trustForwardHeader=false
There is a medium severity vulnerability in Traefik’s ForwardAuth middleware. Even when configured with trustForwardHeader: false, Traefik derives the X-Forwarded-Port header sent to the authentication service from the original incoming request instead of the sanitized forwarded request. As a result, an unauthenticated remote attacker can inject an X-Forwarded-Proto: https header over a plain HTTP connection and cause Traefik to forward X-Forwarded-Port: 443 to the auth service, bypassing port-based authorization checks. This is a regression of the incomplete fix for GHSA-6384-m2mw-rf54, which addressed the X-Forwarded-Proto and X-Forwarded-Prefix spoofing vectors but missed the X-Forwarded-Port vector.
The ForwardAuth middleware, even when configured with trustForwardHeader: false,
still derives the X-Forwarded-Port header sent to the authentication service by
reading the attacker-controlled X-Forwarded-Proto header from the original
incoming request. This allows an unauthenticated remote attacker to cause Traefik
to forward X-Forwarded-Port: 443 to the auth service on a plain HTTP connection,
creating an inconsistency that can bypass port-based authorization checks.
References
- github.com/advisories/GHSA-3q9r-p662-5j8m
- github.com/traefik/traefik/commit/7ae92d8c2c10ac04ef5a03df0ed5019ce0f44b2d
- github.com/traefik/traefik/pull/13344
- github.com/traefik/traefik/releases/tag/v2.11.51
- github.com/traefik/traefik/releases/tag/v3.6.22
- github.com/traefik/traefik/releases/tag/v3.7.6
- github.com/traefik/traefik/security/advisories/GHSA-3q9r-p662-5j8m
- nvd.nist.gov/vuln/detail/CVE-2026-54764
Code Behaviors & Features
Detect and mitigate CVE-2026-54764 with GitLab Dependency Scanning
Secure your software supply chain by verifying that all open source dependencies used in your projects contain no disclosed vulnerabilities. Learn more about Dependency Scanning →