{"id":"GHSA-v84h-653v-4pq9","aliases":["GHSA-v84h-653v-4pq9","GO-2024-2812"],"related":["GO-2024-2813","GHSA-vhxv-fg4m-p2w8"],"kind":"vulnerability","state":"published","title":"Some CORS middleware allow untrusted origins","summary":"### Impact\n\nSome CORS middleware (more specifically those created by specifying two or more origin patterns whose hosts share a proper suffix) incorrectly allow some untrusted origins, thereby opening the door to cross-origin attacks from the untrusted origins in question.\n\nFor example, specifying origin patterns `https://foo.com` and `https://bar.com` (in that order) would yield a middleware that would incorrectly allow untrusted origin `https://barfoo.com`.\n\n### Patches\n\nPatched in v0.9.0.\n\n### Workarounds\n\nNone.","summaryFormat":"markdown","summarySource":"ghsa","descriptions":[{"lang":"en","text":"### Impact\n\nSome CORS middleware (more specifically those created by specifying two or more origin patterns whose hosts share a proper suffix) incorrectly allow some untrusted origins, thereby opening the door to cross-origin attacks from the untrusted origins in question.\n\nFor example, specifying origin patterns `https://foo.com` and `https://bar.com` (in that order) would yield a middleware that would incorrectly allow untrusted origin `https://barfoo.com`.\n\n### Patches\n\nPatched in v0.9.0.\n\n### Workarounds\n\nNone.","format":"markdown","source":"ghsa"},{"lang":"en","text":"Some CORS middleware (more specifically those created by specifying two or more origin patterns whose hosts share a proper suffix) incorrectly allow some untrusted origins, thereby opening the door to cross-origin attacks from the untrusted origins in question.\n\nFor example, specifying origin patterns \"https://foo.com\" and \"https://bar.com\" (in that order) would yield a middleware that would incorrectly allow untrusted origin \"https://barfoo.com\".","format":"markdown","source":"go"}],"published":"2024-05-03T17:34:21.000Z","modified":"2026-02-04T04:32:51.776Z","severity":{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N","score":9.3,"rating":"CRITICAL"},"severities":[{"scorer":"GitHub","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:C/C:H/I:H/A:N","score":9.3,"rating":"CRITICAL"}],"cwes":[],"affected":[{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.9.0"}],"ecosystem":"Go","package":"github.com/jub0bs/fcors","purl":"pkg:golang/github.com/jub0bs/fcors","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.9.0"}],"ecosystem":"Go","package":"github.com/jub0bs/fcors","purl":"pkg:golang/github.com/jub0bs/fcors","source":"go"}],"references":[{"url":"https://github.com/jub0bs/fcors/security/advisories/GHSA-v84h-653v-4pq9","tags":["advisory","web"],"sources":["ghsa","go"]},{"url":"https://github.com/jub0bs/fcors/commit/08d85c149a418a583315cee066d4a35cc817219d","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/jub0bs/fcors/commit/b5dcb889a49def37d7d9c25deb7135f4eb45625e","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://github.com/jub0bs/fcors","tags":["package"],"sources":["ghsa"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-v84h-653v-4pq9","url":"https://github.com/advisories/GHSA-v84h-653v-4pq9","licence":"CC-BY-4.0","modified":"2026-02-04T03:34:24.057Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2024-2812","url":"https://pkg.go.dev/vuln/GO-2024-2812","licence":"CC-BY-4.0","modified":"2026-02-04T04:32:51.776Z"}],"updatedAt":"2026-11-25T22:56:23.730Z"}