CVE-2024-52003

CVE-2024-52003 is a medium-severity open redirect vulnerability in github.com/traefik/traefik/v2 (go), affecting versions < 2.11.14. It is fixed in 2.11.14, 3.2.1.

Summary

Workarounds

No workaround.

For more information

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

Original Description

The previously reported open redirect (GHSA-6qq8-5wq3-86rp) is not fixed correctly. The safePrefix function can be tricked to return an absolute URL.

Details

The Traefik API dashboard component tries to validate that the value of the header X-Forwarded-Prefix is a site relative path:

http.Redirect(resp, req, safePrefix(req)+"/dashboard/", http.StatusFound)
func safePrefix(req *http.Request) string {
	prefix := req.Header.Get("X-Forwarded-Prefix")
	if prefix == "" {
		return ""
	}

	parse, err := url.Parse(prefix)
	if err != nil {
		return ""
	}

	return parse.Path
}

PoC

An attacker can bypass this by sending the following payload:

curl -v 'http://traefik.localhost' -H 'X-Forwarded-Prefix: %0d//a.com'
[...]
> HTTP/1.1 302 Found
> Location: //a.com/dashboard/

or similar:

curl -v 'http://traefik.localhost' -H 'X-Forwarded-Prefix: %2f%2fa.com'
[...]
> HTTP/1.1 302 Found
> Location: //a.com/dashboard/

Impact

Similar to the previously reported bug. In cache poisoning scenarios this may be exploitable.

Impact

There is a vulnerability in Traefik that allows the client to provide the X-Forwarded-Prefix header from an untrusted source.

Untrusted input controls a URL used for redirection, which can forward users to attacker-controlled sites. Typical impact: phishing and credential harvesting via a trusted domain.

Affected versions

github.com/traefik/traefik/v2 (< 2.11.14) github.com/traefik/traefik/v3 (< 3.2.1)

Security releases

github.com/traefik/traefik/v2 → 2.11.14 (go) github.com/traefik/traefik/v3 → 3.2.1 (go)

Kodem intelligence

Severity tells you how bad this could be in the worst case. It does not tell you whether you are exposed. Exploitability and impact are functions of runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A vulnerable package can sit in your dependency tree and never run.

Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter. Kodem's runtime-powered SCA identifies whether this CVE is reachable in your applications.

See it in your environment

Remediation advice

Frequently Asked Questions

  1. What is CVE-2024-52003? CVE-2024-52003 is a medium-severity open redirect vulnerability in github.com/traefik/traefik/v2 (go), affecting versions < 2.11.14. It is fixed in 2.11.14, 3.2.1. Untrusted input controls a URL used for redirection, which can forward users to attacker-controlled sites.
  2. Which packages are affected by CVE-2024-52003?
    • github.com/traefik/traefik/v2 (go) (versions < 2.11.14)
    • github.com/traefik/traefik/v3 (go) (versions < 3.2.1)
  3. Is there a fix for CVE-2024-52003? Yes. CVE-2024-52003 is fixed in 2.11.14, 3.2.1. Upgrade to this version or later.
  4. Is CVE-2024-52003 exploitable, and should I be worried? Whether CVE-2024-52003 is exploitable in your environment depends on whether the vulnerable code is present and reachable. A CVSS score is a worst-case rating; it does not account for your specific deployment, configuration, or usage patterns. Kodem, an Intelligent Application Security platform, uses runtime intelligence to show which vulnerabilities actually execute in production, so you can focus on the ones that represent real risk. Get a demo
  5. What actually determines whether CVE-2024-52003 is exploitable, and how bad it is? Exploitability and impact are not fixed properties of a CVE. They depend on runtime truth: whether the vulnerable code is present, reachable, and actually executes in your application. A high CVSS score on a dependency that never runs is not the same as real risk. Kodem, an Intelligent Application Security platform, uses runtime intelligence to reveal which vulnerabilities actually execute in production, so teams prioritize the ones that genuinely matter.
  6. How do I fix CVE-2024-52003?
    • Upgrade github.com/traefik/traefik/v2 to 2.11.14 or later
    • Upgrade github.com/traefik/traefik/v3 to 3.2.1 or later

Other vulnerabilities in github.com/traefik/traefik/v2

CVE-2026-54761CVE-2026-53622CVE-2026-48020CVE-2026-44774CVE-2026-41181

Stop the waste.
Protect your environment with Kodem.