Security Digest · Vulnerability record
CVE-2024-27302: Authorization Bypass Through User-Controlled Key in go-zero
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.
CVSS 9.1 Critical EPSS 0.8% · p55
Should you act?
Critical and remotely reachable
No known exploitation yet, but it is network-reachable without credentials. This signal is computed from CISA KEV, EPSS and CVSS data; it is not an editorial verdict.
- Not in CISA KEV, but CISA’s SSVC assessment records a public proof-of-concept, so attack code exists.
- EPSS 0.8%, percentile 55: FIRST’s model estimates a 0.8% chance of exploitation activity in the next 30 days, higher than 55% of all scored CVEs (moderate). EPSS is a probability, not a verdict.
- Remotely reachable with no login and no user interaction. If the vulnerable service is exposed to the internet, prioritize it.
- Only applies if your dependency tree includes
github.com/zeromicro/go-zero(Go) < 1.4.4, fixed in 1.4.4. Check your lockfile, including transitive dependencies.
What it is
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.
From the GitHub advisory
Summary Hello go-zero maintainer team, I would like to report a security concerning your CORS Filter feature.
Details 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 domain like evil-victim.com
PoC Use code below as a PoC. Only requests from safe.com should bypass the CORS Filter
Send a request to localhost:8888 with Origin:not-safe.com You can see the origin reflected in response, which bypass the CORS Filter
Weakness type: CWE-639.
Product: github.com/zeromicro/go-zero (Go) · Assigned by: GitHub_M · Published: 2024-03-06
Affected and fixed versions
| Ecosystem | Package | Vulnerable | First fixed |
|---|---|---|---|
| Go | github.com/zeromicro/go-zero | < 1.4.4 | 1.4.4 |
| Vendor | Product | Affected versions (per CVE record) |
|---|---|---|
| zeromicro | go-zero | < 1.4.4 |
Severity scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_M | 3.1 | 9.1 Critical | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
| GitHub | 3.1 | 9.1 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N |
- Attack vector: network (remotely reachable)
- Attack complexity: low
- Privileges required: none (no login)
- User interaction: none
- Scope: unchanged
CVSS measures how bad a flaw is if exploited, not how likely exploitation is. Read it next to the exploitation data below.
Exploitation and urgency
- CISA KEV: not listed (no confirmed in-the-wild exploitation known to CISA).
- CISA SSVC assessment: exploitation poc, automatable yes, technical impact total.
- FIRST EPSS (model of 2026-10-21): 0.77% probability of exploitation activity in the next 30 days; percentile 55.
Timeline
- — GitHub-reviewed advisory GHSA-fgxv-gw55-r5fq published (critical)
- — CVE record published by GitHub_M
- — CVE record last updated
Sources and references
Original sources first. Version and fix details should always be confirmed against the vendor or project advisory.
Vulnerability records
- GitHub Advisory GHSA-fgxv-gw55-r5fq github.com
- CVE.org record CVE-2024-27302 cve.org
- NVD entry CVE-2024-27302 nvd.nist.gov
Other references from the CVE record and advisory
- github.com github.com
- github.com github.com