Advisory

GHSA-6qq8-5wq3-86rp

Also known as: CVE-2020-15129

Summary

Traefik vulnerable to Open Redirect via handling of X-Forwarded-Prefix header

Details

Summary

There exists a potential open redirect vulnerability in Traefik's handling of the X-Forwarded-Prefix header. Active Exploitation of this issue is unlikely as it would require active header injection, however the Traefik team addressed this issue nonetheless to prevent abuse in e.g. cache poisoning scenarios.

Details

The Traefik API dashboard component doesn't validate that the value of the header X-Forwarded-Prefix is a site relative path and will redirect to any header provided URI.

e.g.

$ curl --header 'Host:traefik.localhost' --header 'X-Forwarded-Prefix:https://example.org' 'http://localhost:8081'
<a href="https://example.org/dashboard/">Found</a>.`

Impact
A successful exploitation of an open redirect can be used to entice victims to disclose sensitive information.

Workarounds

By using the headers middleware, the request header X-Forwarded-Prefix value can be overridden by the value . (dot)

  • https://docs.traefik.io/v2.2/middlewares/headers/#customrequestheaders
  • https://docs.traefik.io/v1.7/basics/#custom-headers

For more information

If you have any questions or comments about this advisory, open an issue in Traefik.

Credit

This issue was found by the GitHub Application Security Team and reported on behalf of the GHAS by the GitHub Security Lab Team.

Severity

Medium Basis: The source's own band: MODERATE

Dates

Published
2022-02-11 23:19 UTC
Modified
2026-07-08 06:28 UTC

Affected packages and fixes

12 affected packages; all Go · All systems
PackageAffectedFix
github.com/traefik/traefikintroduced 1.5.0-rc5, fixed 1.7.26go get github.com/traefik/[email protected]
github.com/traefik/traefik/v2Earlier versionsgo get github.com/traefik/traefik/[email protected]
github.com/containous/traefikintroduced 1.5.0-rc5, fixed 1.7.26go get github.com/containous/[email protected]
github.com/containous/traefik/v2Earlier versionsgo get github.com/containous/traefik/[email protected]
github.com/traefik/traefik/v2introduced 2.3.0-rc1, fixed 2.3.0-rc6go get github.com/traefik/traefik/[email protected]
github.com/containous/traefik/v2introduced 2.3.0-rc1, fixed 2.3.0-rc3go get github.com/containous/traefik/[email protected]
github.com/traefik/traefik/apiintroduced 1.5.0-rc5, fixed 1.7.26go get github.com/traefik/traefik/[email protected]
github.com/traefik/traefik/v2/pkg/apiEarlier versionsgo get github.com/traefik/traefik/v2/pkg/[email protected]
github.com/traefik/traefik/v2/pkg/apiintroduced 2.3.0-rc1, fixed 2.3.0-rc6go get github.com/traefik/traefik/v2/pkg/[email protected]
github.com/containous/traefik/apiintroduced 1.5.0-rc5, fixed 1.7.26go get github.com/containous/traefik/[email protected]
github.com/containous/traefik/v2/pkg/apiEarlier versionsgo get github.com/containous/traefik/v2/pkg/[email protected]
github.com/containous/traefik/v2/pkg/apiintroduced 2.3.0-rc1, fixed 2.3.0-rc3go get github.com/containous/traefik/v2/pkg/[email protected]

Fix commands are the export's own generic commands. Ojuju never runs them. Check them against your setup first.

Check your own computer: guard packages check

View this record on OSV.dev

Source

Source: GitHub Advisory Database (reviewed advisories) · CC BY 4.0

Sources & licences