{"answers":{"affected":"3 open source packages ship an affected version, including github.com/zeromicro/go-zero. It affects 1 product.","exploited":"It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-27302 exists.","fix":"Upgrade github.com/zeromicro/go-zero to 1.4.4 or later.","what":"CVE-2024-27302 is a critical vulnerability in zeromicro go-zero, published on 6 Mar 2024. An attacker can exploit it over the internet without logging in, with no action from the victim."},"fix_prompt":"Check this codebase for CVE-2024-27302 and fix it if it is affected.\n\nWhat it is: CVE-2024-27302 is a critical vulnerability in zeromicro go-zero, published on 6 Mar 2024. An attacker can exploit it over the internet without logging in, with no action from the victim.\nExploitation: It is not confirmed as exploited in the wild, but public exploit code for CVE-2024-27302 exists.\n\nAffected packages and fixed versions:\n- github.com/zeromicro/go-zero (Go): affected all versions; fixed in 1.4.4\n- github.com/zeromicro/go-zero (Go): affected all versions; fixed in 1.4.4\n- github.com/zeromicro/go-zero (Go): affected all versions; fixed in 1.4.4\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2024-27302/ (Markdown: https://insights.sbomify.com/CVE-2024-27302/index.md)","id":"CVE-2024-27302","markdown":"https://insights.sbomify.com/CVE-2024-27302/index.md","name":"CVE-2024-27302","record":{"aliases":["GHSA-fgxv-gw55-r5fq","GO-2024-2604"],"analysis":{"component_type":"library","fix_type":"upgrade","impacts":["data_read","security_bypass"],"network_reachable":"yes","non_default_config":true,"product_category":"Go web framework","requires_auth":"none","summary":"Attackers can bypass CORS restrictions in go-zero by using malicious domains, allowing unauthorized data retrieval on behalf of other users.","user_interaction":"not_required","vuln_class":"security_feature_bypass"},"analysis_generated_by":"qwen3.8-flash-next","assigner":"GitHub_M","cpe":[{"product":"go-zero","vendor":"go-zero"}],"cvss":{"score":9.1,"severity":"critical","source":"cna","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N","version":"3.1"},"cwes":[{"id":"CWE-639","name":"Authorization Bypass Through User-Controlled Key"}],"description":"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.","ecosystems":["Go"],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"weaponised"},"has_fix":true,"headline":"Authorization Bypass Through User-Controlled Key in go-zero","id":"CVE-2024-27302","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":"Go","product":null,"products":[],"type":"security_feature_bypass","year":"2024"},"n_packages":3,"n_references":2,"next":{"headline":"electron-builder's NSIS installer - execute arbitrary code on the target machine (Windows only)","id":"CVE-2024-27303"},"packages":[{"ecosystem":"Go","fixed":["1.4.4"],"introduced":["0"],"last_affected":[],"package":"github.com/zeromicro/go-zero","purl":null,"source":"GHSA-fgxv-gw55-r5fq"},{"ecosystem":"Go","fixed":["1.4.4"],"introduced":["0"],"last_affected":[],"package":"github.com/zeromicro/go-zero","purl":"pkg:golang/github.com/zeromicro/go-zero","source":"GHSA-fgxv-gw55-r5fq"},{"ecosystem":"Go","fixed":["1.4.4"],"introduced":["0"],"last_affected":[],"package":"github.com/zeromicro/go-zero","purl":"pkg:golang/github.com/zeromicro/go-zero","source":"GO-2024-2604"}],"prev":{"headline":"Privilege Escalation Abusing installer in SupportApp","id":"CVE-2024-27301"},"products":["go-zero"],"published":"2024-03-06","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"},{"class":"attribution","licence":"CC BY 4.0","name":"GitHub Advisory Database","prefix":"GHSA"},{"class":"attribution","licence":"CC BY 4.0","name":"Go Vulnerability Database","prefix":"GO"},{"class":"attribution","licence":"US public information, NVD API terms","name":"NVD"},{"class":"attribution","licence":"CWE Terms of Use","name":"CWE (MITRE)"},{"class":"attribution","licence":"FIRST CVSS licence","name":"CVSS (FIRST)"}],"ssvc":{"automatable":"yes","exploitation":"poc","technical_impact":"total"},"state":"PUBLISHED","updated":"2024-08-05","vendors":["zeromicro"]},"summary":"Attackers can bypass CORS restrictions in go-zero by using malicious domains, allowing unauthorized data retrieval on behalf of other users.","url":"https://insights.sbomify.com/CVE-2024-27302/"}