GHSA-6qq8-5wq3-86rp CVE-2020-15129
Traefik vulnerable to Open Redirect via handling of X-Forwarded-Prefix header
- Severity
- 6.1 / 10
- Medium · CVSS 3.1
- Exploit chance (EPSS)
- 8.01%
- Chance of exploitation in the next 30 days. Higher than 94.77% of scored vulnerabilities.
- Known exploited
- No
- Not in CISA's catalog
- Weakness
- CWE-601 URL Redirection to Untrusted Site ('Open Redirect')
- Fix
- Available
- 8 packages have a fixed version
Description
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.
Affected versions
Go
| Package | Vulnerable | Fixed in |
|---|---|---|
| github.com/containous/traefik | >= 1.5.0-rc5, < 1.7.26 |
1.7.26 |
| github.com/containous/traefik/api | >= 1.5.0-rc5, < 1.7.26 |
1.7.26 |
| github.com/containous/traefik/v2 | < 2.2.8 |
2.2.8 |
| github.com/containous/traefik/v2 | >= 2.3.0-rc1, < 2.3.0-rc3 |
2.3.0-rc3 |
| github.com/containous/traefik/v2/pkg/api | < 2.2.8 |
2.2.8 |
| github.com/containous/traefik/v2/pkg/api | >= 2.3.0-rc1, < 2.3.0-rc3 |
2.3.0-rc3 |
| github.com/traefik/traefik | >= 1.5.0-rc5, < 1.7.26 |
1.7.26 |
| github.com/traefik/traefik/api | >= 1.5.0-rc5, < 1.7.26 |
1.7.26 |
| github.com/traefik/traefik/v2 | < 2.3.0-rc6 |
2.3.0-rc6 |
| github.com/traefik/traefik/v2 | >= 2.3.0-rc1, < 2.3.0-rc6 |
2.3.0-rc6 |
| github.com/traefik/traefik/v2/pkg/api | < 2.3.0-rc6 |
2.3.0-rc6 |
| github.com/traefik/traefik/v2/pkg/api | >= 2.3.0-rc1, < 2.3.0-rc6 |
2.3.0-rc6 |
How to fix
Move to the fixed version or later with your package manager, update the lockfile, and run your tests. If the package only arrives through another dependency, upgrade that dependency first. If none of its releases pulls a fixed version yet, force the version with your package manager's override.
github.com/containous/traefik Go → 1.7.26
- go
go get github.com/containous/traefik@v1.7.26 && go mod tidy
github.com/containous/traefik/api Go → 1.7.26
- go
go get github.com/containous/traefik/api@v1.7.26 && go mod tidy
github.com/containous/traefik/v2 Go → 2.2.8
- go
go get github.com/containous/traefik/v2@v2.2.8 && go mod tidy
github.com/containous/traefik/v2/pkg/api Go → 2.2.8
- go
go get github.com/containous/traefik/v2/pkg/api@v2.2.8 && go mod tidy
github.com/traefik/traefik Go → 1.7.26
- go
go get github.com/traefik/traefik@v1.7.26 && go mod tidy
github.com/traefik/traefik/api Go → 1.7.26
- go
go get github.com/traefik/traefik/api@v1.7.26 && go mod tidy
github.com/traefik/traefik/v2 Go → 2.3.0-rc6
- go
go get github.com/traefik/traefik/v2@v2.3.0-rc6 && go mod tidy
github.com/traefik/traefik/v2/pkg/api Go → 2.3.0-rc6
- go
go get github.com/traefik/traefik/v2/pkg/api@v2.3.0-rc6 && go mod tidy
Severity breakdown
CVSS 3.1 6.1
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N
- Attack vector
- Network
- Attack complexity
- High
- Privileges required
- None
- User interaction
- Required
- Scope
- Changed
- Confidentiality
- None
- Integrity
- High
- Availability
- None
Weakness
CWE-601: URL Redirection to Untrusted Site ('Open Redirect')
The web application accepts a user-controlled input that specifies a link to an external site, and uses that link in a redirect.
How to prevent it
- Implementation: Assume all input is malicious. Use an "accept known good" input validation strategy, i.e., use a list of acceptable inputs that strictly conform to specifications. Reject any input that does not strictly conform to specifications, or transform it into something that does. When performing input validation, consider all potentially relevant properties, including length, type of input, the full range of acceptable values, missing or extra inputs, syntax, consistency across related fields, and conformance to business rules. As an example of business rule logic, "boat" may be syntactically valid because it only contains alphanumeric characters, but it is not valid if the input is only expected to contain colors such as "red" or "blue." Do not rely exclusively on looking for malicious or malformed inputs. This is likely to miss at least one undesirable input, especially if the code's environment changes. This can give attackers enough room to bypass the intended validation. However, denylists can be useful for detecting potential attacks or determining which inputs are so malformed that they should be rejected outright. Use a list of approved URLs or domains to be used for redirection.
- Architecture and Design: Use an intermediate disclaimer page that provides the user with a clear warning that they are leaving the current site. Implement a long timeout before the redirect occurs, or force the user to click on the link. Be careful to avoid XSS problems (CWE-79) when generating the disclaimer page.
- Architecture and Design: When the set of acceptable objects, such as filenames or URLs, is limited or known, create a mapping from a set of fixed input values (such as numeric IDs) to the actual filenames or URLs, and reject all other inputs. For example, ID 1 could map to "/login.asp" and ID 2 could map to "http://www.example.com/". Features such as the ESAPI AccessReferenceMap [REF-45] provide this capability.
- Architecture and Design: Ensure that no externally-supplied requests are honored by requiring that all redirect requests include a unique nonce generated by the application [REF-483]. Be sure that the nonce is not predictable (CWE-330).
- Architecture and Design, Implementation: Understand all the potential areas where untrusted inputs can enter your software: parameters or arguments, cookies, anything read from the network, environment variables, reverse DNS lookups, query results, request headers, URL components, e-mail, files, filenames, databases, and any external systems that provide data to the application. Remember that such inputs may be obtained indirectly through API calls. Many open redirect problems occur because the programmer assumed that certain inputs could not be modified, such as cookies and hidden form fields.
- Operation: Use an application firewall that can detect attacks against this weakness. It can be beneficial in cases in which the code cannot be fixed (because it is controlled by a third party), as an emergency prevention measure while more comprehensive software assurance measures are applied, or to provide defense in depth [REF-1481].
References
Advisories
Packages
Other links
- github.com/containous/traefik/security/advisories/GHSA-6qq8-5wq3-86rp
- github.com/containous/traefik/pull/7109
- github.com/containous/traefik/commit/cfa04c300c5db95ae8a52c31a9d973b6dd9c2254
- github.com/containous/traefik/commit/e63db782c11c7b8bfce30be4c902e7ef8f9f33d2
- github.com/traefik/traefik/commit/e2c5f3712f68993de8ed3cb30da9ec0aa11acb09
- github.com/containous/traefik/releases/tag/v1.7.26
- github.com/containous/traefik/releases/tag/v2.2.8
- github.com/containous/traefik/releases/tag/v2.3.0-rc3
Timeline
- Published
- Last updated by the source
- Latest EPSS score
Related advisories
| Advisory | Severity | Why it's related |
|---|---|---|
| GO-2026-6558 Traefik: BasicAuth singleflight coalescing reintroduces an unauthenticated username-enumeration timing oracle | Medium | Also affects github.com/traefik/traefik |
| GHSA-f52w-8j3h-j724 Traefik: Rootless HTTP/1 request-target routes as "/" but is forwarded verbatim, bypassing path-scoped routing, middleware guards and access logging | High | Also affects github.com/traefik/traefik |
| GHSA-w4v4-9rw7-5326 Traefik: Inconsistent Interpretation of HTTP Requests ('HTTP Request/Response Smuggling') and Incorrect Authorization | Critical | Also affects github.com/traefik/traefik |
| GHSA-qqjf-53cj-pwvv Traefik HTTP/3 Backend NTLM Connection Reuse | Critical | Also affects github.com/traefik/traefik |
| GO-2026-6467 Traefik entrypoint header-name sanitization bypassed via request trailers | High | Also affects github.com/traefik/traefik |
| GHSA-rf44-j88r-hh8c Traefik: ForwardAuth identity spoofing via dot-form header alias | High | Also affects github.com/traefik/traefik |
| GHSA-7ghq-v6jf-g56c Traefik: respondingTimeouts.readTimeout is not applied to HTTP/3, leaving slow-body uploads unbounded | Medium | Also affects github.com/traefik/traefik |
| GHSA-62fc-8686-hfmq Traefik: `allowCrossNamespace=false` bypass via `@kubernetescrd` TraefikService backendRef | Medium | Also affects github.com/traefik/traefik |
MergeHarbor checks every repository's dependencies against this database, ranks what matters by exploitability and reachability, routes it to the owning team and opens the fix pull request.
Check your repos with MergeHarbor