Skip to content

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

Moderate severity GitHub Reviewed Published Jul 30, 2020 in traefik/traefik • Updated Jan 27, 2023

Package

gomod github.com/containous/traefik (Go)

Affected versions

>= 1.5.0-rc5, < 1.7.26

Patched versions

1.7.26
gomod github.com/containous/traefik/api (Go)
>= 1.5.0-rc5, < 1.7.26
1.7.26
gomod github.com/containous/traefik/v2 (Go)
< 2.2.8
>= 2.3.0-rc1, < 2.3.0-rc3
2.2.8
2.3.0-rc3
gomod github.com/containous/traefik/v2/pkg/api (Go)
< 2.2.8
>= 2.3.0-rc1, < 2.3.0-rc3
2.2.8
2.3.0-rc3
gomod github.com/traefik/traefik (Go)
>= 1.5.0-rc5, < 1.7.26
1.7.26
gomod github.com/traefik/traefik/api (Go)
>= 1.5.0-rc5, < 1.7.26
1.7.26
gomod github.com/traefik/traefik/v2 (Go)
< 2.2.8
>= 2.3.0-rc1, < 2.3.0-rc3
2.3.0-rc6
2.3.0-rc6
gomod github.com/traefik/traefik/v2/pkg/api (Go)
< 2.2.8
>= 2.3.0-rc1, < 2.3.0-rc3
2.3.0-rc6
2.3.0-rc6

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)

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.

References

@emilevauge emilevauge published to traefik/traefik Jul 30, 2020
Published by the National Vulnerability Database Jul 30, 2020
Reviewed May 24, 2021
Published to the GitHub Advisory Database Feb 11, 2022
Last updated Jan 27, 2023

Severity

Moderate

CVSS overall score

This score calculates overall vulnerability severity from 0 to 10 and is based on the Common Vulnerability Scoring System (CVSS).
/ 10

CVSS v3 base metrics

Attack vector
Network
Attack complexity
High
Privileges required
None
User interaction
Required
Scope
Changed
Confidentiality
None
Integrity
High
Availability
None

CVSS v3 base metrics

Attack vector: More severe the more the remote (logically and physically) an attacker can be in order to exploit the vulnerability.
Attack complexity: More severe for the least complex attacks.
Privileges required: More severe if no privileges are required.
User interaction: More severe when no user interaction is required.
Scope: More severe when a scope change occurs, e.g. one vulnerable component impacts resources in components beyond its security scope.
Confidentiality: More severe when loss of data confidentiality is highest, measuring the level of data access available to an unauthorized user.
Integrity: More severe when loss of data integrity is the highest, measuring the consequence of data modification possible by an unauthorized user.
Availability: More severe when the loss of impacted component availability is highest.
CVSS:3.1/AV:N/AC:H/PR:N/UI:R/S:C/C:N/I:H/A:N

EPSS score

0.979%
(84th percentile)

Weaknesses

CVE ID

CVE-2020-15129

GHSA ID

GHSA-6qq8-5wq3-86rp

Source code

Credits

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.