CVE-2026-29054: Traefik: lowercase `Connection` tokens can delete traefik-managed forwarded identity headers (for example, `X-Real-Ip`)

Published Mar 4, 2026
·
Updated

Impact

There is a potential vulnerability in Traefik managing the Connection header with X-Forwarded headers.

When Traefik processes HTTP/1.1 requests, the protection put in place to prevent the removal of Traefik-managed X-Forwarded headers (such as X-Real-Ip, X-Forwarded-Host, X-Forwarded-Port, etc.) via the Connection header does not handle case sensitivity correctly. The Connection tokens are compared case-sensitively against the protected header names, but the actual header deletion operates case-insensitively. As a result, a remote unauthenticated client can use lowercase Connection tokens (e.g. Connection: x-real-ip) to bypass the protection and trigger the removal of Traefik-managed forwarded identity headers.

This is a bypass of the fix for CVE-2024-45410.

Depending on the deployment, the impact may be higher if downstream services rely on these headers (such as X-Real-Ip or X-Forwarded-) for authentication, authorization, routing, or scheme decisions.

Patches

- https://github.com/traefik/traefik/releases/tag/v2.11.38 - https://github.com/traefik/traefik/releases/tag/v3.6.9

Workarounds

No workaround available.

For more information

If there are any questions or comments about this advisory, please open an issue.

---

<details> <summary>Original Description</summary>

Traefik's XForwarded middleware (removeConnectionHeaders) tries to prevent clients from using the Connection header to strip trusted X-Forwarded- headers, but the protection compares the Connection tokens case-sensitively while the deletion is case-insensitive.

As a result, a remote unauthenticated client can send a lowercase token like Connection: x-real-ip and still trigger deletion of traefik-managed X-Real-Ip (and similarly named headers in the managed list).

This can cause downstream routing, scheme, and header-based authn/authz decisions to be evaluated with missing trusted forwarding identity headers.

Severity

CRITICAL

Rationale: the PoC demonstrates an end-to-end access control bypass pattern when a downstream service uses proxy-provided identity headers (for example, X-Real-Ip) for IP allowlists or trust decisions. A remote unauthenticated client can strip the traefik-managed identity header via a lowercase Connection token, causing the downstream service to evaluate the request without the expected header signal.

Relevant Links

- Repository: https://github.com/traefik/traefik - Pinned commit: a4a91344edcdd6276c1b766ca19ee3f0e346480f - Callsite (pinned): https://github.com/traefik/traefik/blob/a4a91344edcdd6276c1b766ca19ee3f0e346480f/pkg/middlewares/forwardedheaders/forwardedheader.go#L225

Vulnerability Details

Root Cause

removeConnectionHeaders uses a case-sensitive membership check for protected header names when inspecting Connection tokens, but it deletes headers via net/http which treats header names case-insensitively. A lowercase token bypasses the protection check and still triggers deletion.

Attacker Control / Attack Path

Remote unauthenticated HTTP client (untrusted IP) sends Connection: x-real-ip, and Traefik deletes the generated X-Real-Ip header.

Proof of Concept

The attached poc.zip contains a deterministic, make-based integration PoC with a canonical run and a negative control.

Canonical (vulnerable):

unzip poc.zip -d poc cd poc make test

Output contains:

[CALLSITEHIT]: pkg/middlewares/forwardedheaders/forwardedheader.go:225 [PROOFMARKER]: downstreamadminbypass=1 xrealippresent=0

Control (same env, no lowercase token):

unzip poc.zip -d poc cd poc make test

Output contains:

[CALLSITEHIT]: pkg/middlewares/forwardedheaders/forwardedheader.go:225 [NCMARKER]: downstreamadminbypass=0 xrealippresent=1

Expected: Connection tokens are handled case-insensitively and protected identity headers (for example, X-Real-Ip and X-Forwarded-) are not deleted due to client-supplied Connection options (regardless of token casing).

Actual: Lowercase Connection tokens bypass the protection check and still trigger deletion of traefik-managed identity headers (for example, X-Real-Ip).

Recommended Fix

- Case-fold (or otherwise canonicalize) Connection header tokens before comparing them against protected header names. - Add a regression test covering lowercase tokens (for example, Connection: x-real-ip).

Fix accepted when: a request with Connection: x-real-ip does not cause deletion of traefik-managed X-Real-Ip, and a regression test covers this behavior.

</details>

Other sources

Traefik is an HTTP reverse proxy and load balancer. From version 2.11.9 to 2.11.37 and from version 3.1.3 to 3.6.8, there is a potential vulnerability in Traefik managing the Connection header with X-Forwarded headers. When Traefik processes HTTP/1.1 requests, the protection put in place to prevent the removal of Traefik-managed X-Forwarded headers (such as X-Real-Ip, X-Forwarded-Host, X-Forwarded-Port, etc.) via the Connection header does not handle case sensitivity correctly. The Connection tokens are compared case-sensitively against the protected header names, but the actual header deletion operates case-insensitively. As a result, a remote unauthenticated client can use lowercase Connection tokens (e.g. Connection: x-real-ip) to bypass the protection and trigger the removal of Traefik-managed forwarded identity headers. This issue has been patched in versions 2.11.38 and 3.6.9.

MITRE

Affected Software

4 affected componentsFixes available
go/github.com/traefik/traefik/v3>=3.1.3<=3.6.8
3.6.9
go/github.com/traefik/traefik/v2>=2.11.9<=2.11.37
2.11.38
Traefik traefik>=2.11.9<2.11.38
Traefik traefik>=3.1.3<3.6.9

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/traefik/traefik/v3 to a version that resolves this vulnerability.

    Fixed in 3.6.9
  2. Upgrade

    Upgrade go/github.com/traefik/traefik/v2 to a version that resolves this vulnerability.

    Fixed in 2.11.38
  3. Upgrade

    Upgrade traefik to a version that resolves this vulnerability.

    Fixed in 2.11.38
  4. Upgrade

    Upgrade traefik to a version that resolves this vulnerability.

    Fixed in 3.6.9
  5. Configuration

    Modify the removeConnectionHeaders protection logic to compare Connection header tokens case-insensitively (e.g., case-fold Connection tokens) against the protected header names, so a request with Connection: x-real-ip does not delete Traefik-managed identity headers like X-Real-Ip or X-Forwarded-*.

    Traefik XForwarded middleware (removeConnectionHeaders) Connection header token handling = Case-fold (canonicalize) tokens before comparing against protected header names

Event History

Mar 4, 2026
Advisory Published
via GitHub·09:19 PM
Data Sourced
via GitHub·09:19 PM
DescriptionSeverityWeaknessAffected Software
Mar 5, 2026
CVE Published
via MITRE·04:18 PM
Data Sourced
via MITRE·04:18 PM
DescriptionSeverityWeakness
Data Sourced
via Red Hat·07:01 PM
DescriptionSeverityAffected Software
Data Sourced
via NVD·07:16 PM
RemedyDescriptionSeverityWeaknessAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2026-29054?

CVE-2026-29054 has a moderate severity rating due to its potential impact on the management of X-Forwarded headers in Traefik.

2

How do I fix CVE-2026-29054?

To fix CVE-2026-29054, upgrade Traefik to version 3.6.9 for v3 or 2.11.38 for v2.

3

What products are affected by CVE-2026-29054?

CVE-2026-29054 affects Traefik versions from 3.1.3 to 3.6.8 and from 2.11.9 to 2.11.37.

4

What type of vulnerability is CVE-2026-29054?

CVE-2026-29054 is a vulnerability related to HTTP header management in Traefik.

5

When was CVE-2026-29054 disclosed?

CVE-2026-29054 was disclosed through a GitHub advisory.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203