CVE-2024-27302CWE-639

Authorization Bypass Through User-Controlled Key in go-zero

Critical · published March 6, 2024

CVSS v3.1
9.1
EPSS
1%
Percentile
55.3
In the wild
Unconfirmed
What it is

🔥 A sneaky CORS flaw in go-zero could let malicious sites swipe data from unsuspecting users! Imagine a restaurant that lets anyone order food just by saying they’re from a specific VIP club, but the bouncer only checks if the request ends with "member" — that’s how the `isOriginAllowed` check works; it’s just too easy for a crafty intruder to game the system! This vulnerability enables attackers to bypass Cross-Origin Resource Sharing (CORS) policies, allowing unauthorized domains to send requests and retrieve sensitive data on behalf of users. If exploited, it could lead to data leaks and unauthorized actions within your applications, making it critical to act swiftly!

Put simply

Imagine a restaurant that lets anyone order food just by saying they’re from a specific VIP club, but the bouncer only checks if the request ends with "member" — that’s how the `isOriginAllowed` check works; it’s just too easy for a crafty intruder to game the system! The issue lies in the `isOriginAllowed` function using `strings.HasSuffix` for origin checks, which allows attackers to craft malicious domains that fit the suffix, successfully bypassing security measures.

What to do

This vulnerability enables attackers to bypass Cross-Origin Resource Sharing (CORS) policies, allowing unauthorized domains to send requests and retrieve sensitive data on behalf of users. If exploited, it could lead to data leaks and unauthorized actions within your applications, making it critical to act swiftly! Update go-zero to version 1.4.4 immediately to close this critical vulnerability. Additionally, review your CORS policy and ensure that it uses more robust methods for validating origins to prevent future bypasses. You've got this! Follow these steps, and you'll be well on your way to securing your application! 🛡️

The record
Technical detail
CVSS v3.1
9.1 · CRITICAL
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
CVSS v4.0
Not supplied
EPSS
0.00774 · 55.3th percentile
Weakness
CWE-639 · Authorization Bypass Through User-Controlled Key
Published
2024-03-06T18:31Z
EPSS history
Timeline
  • 06 MAR 18:31Z
    Authorization Bypass Through User-Controlled Key in go-zero
    cvelistv5