{"id":"GHSA-vhxv-fg4m-p2w8","aliases":["GHSA-vhxv-fg4m-p2w8","GO-2024-2813"],"related":["GO-2024-2812","GHSA-v84h-653v-4pq9"],"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.1.3.\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.1.3.\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:17.000Z","modified":"2026-02-04T03:40:21.076Z","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.1.3"}],"ecosystem":"Go","package":"github.com/jub0bs/cors","purl":"pkg:golang/github.com/jub0bs/cors","source":"ghsa"},{"ranges":[{"type":"semver","introduced":"0","status":"affected","fixed":"0.1.3"}],"ecosystem":"Go","package":"github.com/jub0bs/cors","purl":"pkg:golang/github.com/jub0bs/cors","source":"go"}],"references":[{"url":"https://github.com/jub0bs/cors/security/advisories/GHSA-vhxv-fg4m-p2w8","tags":["advisory","web"],"sources":["ghsa","go"]},{"url":"https://github.com/jub0bs/cors/commit/5bc0648a32db2d600179a50866f648f4d7090363","tags":["web"],"sources":["ghsa"]},{"url":"https://github.com/jub0bs/cors/commit/63900fa1776237095fa0ed47ff85791e21f3a7d7","tags":["fix","web"],"sources":["ghsa","go"]},{"url":"https://github.com/jub0bs/cors","tags":["package"],"sources":["ghsa"]}],"credits":[],"sources":[{"source":"ghsa","name":"GitHub Advisory Database","id":"GHSA-vhxv-fg4m-p2w8","url":"https://github.com/advisories/GHSA-vhxv-fg4m-p2w8","licence":"CC-BY-4.0","modified":"2026-02-04T02:40:18.244Z"},{"source":"go","name":"Go Vulnerability Database","id":"GO-2024-2813","url":"https://pkg.go.dev/vuln/GO-2024-2813","licence":"CC-BY-4.0","modified":"2026-02-04T03:40:21.076Z"}],"updatedAt":"2026-11-25T22:56:23.731Z"}