CVE-2024-52003: Traefik Open Redirect Vulnerability via X-Forwarded-Prefix Header
Summary
CVE-2024-52003: Traefik's X-Forwarded-Prefix Header still allows for Open Redirect. Affects github.com/traefik/traefik/v2 versions < 2.11.14. Fixed in 2.11.14. How to fix ↓
Also tracked for
The same CVE-2024-52003 is tracked separately for each ecosystem and vendor. Its fix information is the same; the package and affected versions differ.
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
Traefik is a modern HTTP reverse proxy and load balancer that makes deploying microservices easy. It is designed to manage traffic to various services seamlessly, providing features such as automatic service discovery, load balancing, and SSL termination. However, a vulnerability has been identified in Traefik that allows untrusted sources to manipulate the X-Forwarded-Prefix header, potentially leading to open redirect attacks.
Vulnerability Detail
The vulnerability arises from the improper validation of the X-Forwarded-Prefix header in Traefik's API dashboard component. An attacker can exploit this flaw by sending a specially crafted request that tricks the safePrefix function into returning an absolute URL instead of a site-relative path. This can lead to open redirect scenarios, where users are redirected to malicious sites, potentially facilitating phishing attacks or cache poisoning.
How To Fix
Latest published version: v2.11.60 as of 22 Oct 2026
go get github.com/traefik/traefik/v2@v2.11.60
Upgrading to it may include breaking changes; the version below is the minimum fixed release for this vulnerability.
If you need the minimum change
2.11.14
This is the first release that contains the fix.
go get github.com/traefik/traefik/v2@v2.11.14
Tip — Not sure which version your app runs? Vulert can match this fix to it. Scan free →
Workaround
Currently, there are no workarounds available for this vulnerability. It is recommended to update to the patched versions as soon as possible.
Conclusion
The identified vulnerability in Traefik related to the X-Forwarded-Prefix header poses a significant risk of open redirects. It is crucial for users to update to the latest patched versions to mitigate this risk and ensure the security of their applications.
See every vulnerability recorded for github.com/traefik/traefik/v2 →
FAQ
The X-Forwarded-Prefix header is used to indicate the original URL path of a request when it is forwarded by a proxy. It helps in reconstructing the original request URL.
An attacker can exploit this vulnerability by sending a crafted request with a malicious X-Forwarded-Prefix header, causing the application to redirect users to an unintended location.
The potential impacts include phishing attacks, where users are redirected to malicious sites, and cache poisoning, which can affect the integrity of cached content.
Yes, you can use Vulert to monitor and alert in real-time for open-source vulnerabilities in your software. It requires no code access or installation, just the Gopkg.lock file.
You can check if your application is affected by using the Vulert playground at Vulert Scanner without any signup.
References
Related vulnerabilities
Recent vulnerabilities recorded for github.com/traefik/traefik/v2.