{"id":"CVE-2024-27302","summary":"Authorization Bypass Through User-Controlled Key in go-zero","details":"go-zero is a web and rpc framework. Go-zero allows user to specify a CORS Filter with a configurable allows param - which is an array of domains allowed in CORS policy. However, the `isOriginAllowed` uses `strings.HasSuffix` to check the origin, which leads to bypass via a malicious domain. This vulnerability is capable of breaking CORS policy and thus allowing any page to make requests and/or retrieve data on behalf of other users. Version 1.4.4 fixes this issue.\n","aliases":["GHSA-fgxv-gw55-r5fq","GO-2024-2604"],"modified":"2026-08-12T03:51:45.329047006Z","published":"2024-03-06T18:31:31.309Z","database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/27xxx/CVE-2024-27302.json","cna_assigner":"GitHub_M","cwe_ids":["CWE-639"]},"references":[{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/27xxx/CVE-2024-27302.json"},{"type":"ADVISORY","url":"https://github.com/zeromicro/go-zero/security/advisories/GHSA-fgxv-gw55-r5fq"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2024-27302"},{"type":"FIX","url":"https://github.com/zeromicro/go-zero/commit/d9d79e930dff6218a873f4f02115df61c38b15db"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://github.com/zeromicro/go-zero","events":[{"introduced":"0"},{"fixed":"f3369f8e816d7bdeef970069b409ca3a017818bf"},{"fixed":"d9d79e930dff6218a873f4f02115df61c38b15db"}],"database_specific":{"cpe":"cpe:2.3:a:go-zero:go-zero:*:*:*:*:*:*:*:*","extracted_events":[{"introduced":"0"},{"fixed":"1.4.4"}],"source":["CPE_RANGE","REFERENCES"]}}],"versions":["v1.5.0","tools/goctl/v1.5.0","v1.4.4","tools/goctl/v1.4.4","v1.4.3","tools/goctl/v1.4.3","v1.4.2","tools/goctl/v1.4.2","tools/goctl/v1.4.1","v1.4.1","tools/goctl/v1.4.0","v1.4.0","v1.3.5","tools/goctl/v1.3.9","tools/goctl/v1.3.8","tools/goctl/v1.3.7","tools/goctl/v1.3.6","v1.3.4","v1.3.3","tools/goctl/v1.3.5","tools/goctl/v1.3.4","v1.3.2","tools/goctl/v1.3.3","v1.3.1","tools/goctl/v1.3.2","tools/goctl/v1.3.0","tools/goctl/v1.3.1-alpha","tools/goctl/v1.3.1","v1.3.0","tools/goctl/v1.3.0-beta1","tools/goctl/v1.3.0-alpha","v1.3.0-beta","tools/goctl/v1.2.5","v1.3.0-alpha","v1.2.5","tools/goctl/v1.2.4","v1.2.4","v1.2.3","v1.2.2","v1.2.1","v1.2.0","v1.1.10","v1.1.9","v1.1.8","v1.1.7","v1.1.6","v1.1.5","v1.1.4","v1.1.3-pre","v1.1.3-beta","v1.1.3","v1.1.2","v1.1.1","v1.1.0","v1.0.29","v1.0.28","v1.0.27","v1.0.26","v1.0.25","v1.0.24","v1.0.23","v1.0.22","v1.0.21","v1.0.20","v1.0.19","v1.0.18","v1.0.17","v1.0.16","v1.0.15","v1.0.14","v1.0.13","v1.0.12","v1.0.11","v1.0.10","v1.0.9","v1.0.8","v1.0.7","v1.0.6","v1.0.5","v1.0.4","v1.0.3","v1.0.2","v1.0.1","v1.0.0"],"database_specific":{"source":"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-27302.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"}]}