Join the Cyber Forum: Threat Intel on May 12, 2026 to learn how AI is reshaping threat defense.Join the Virtual Cyber Forum: Threat IntelRegister Now
Experiencing a Breach?Blog
Get StartedContact Us
SentinelOne
  • Platform
    Platform Overview
    • Singularity Platform
      Welcome to Integrated Enterprise Security
    • AI for Security
      Leading the Way in AI-Powered Security Solutions
    • Securing AI
      Accelerate AI Adoption with Secure AI Tools, Apps, and Agents.
    • How It Works
      The Singularity XDR Difference
    • Singularity Marketplace
      One-Click Integrations to Unlock the Power of XDR
    • Pricing & Packaging
      Comparisons and Guidance at a Glance
    Data & AI
    • Purple AI
      Accelerate SecOps with Generative AI
    • Singularity Hyperautomation
      Easily Automate Security Processes
    • AI-SIEM
      The AI SIEM for the Autonomous SOC
    • AI Data Pipelines
      Security Data Pipeline for AI SIEM and Data Optimization
    • Singularity Data Lake
      AI-Powered, Unified Data Lake
    • Singularity Data Lake for Log Analytics
      Seamlessly Ingest Data from On-Prem, Cloud or Hybrid Environments
    Endpoint Security
    • Singularity Endpoint
      Autonomous Prevention, Detection, and Response
    • Singularity XDR
      Native & Open Protection, Detection, and Response
    • Singularity RemoteOps Forensics
      Orchestrate Forensics at Scale
    • Singularity Threat Intelligence
      Comprehensive Adversary Intelligence
    • Singularity Vulnerability Management
      Application & OS Vulnerability Management
    • Singularity Identity
      Identity Threat Detection and Response
    Cloud Security
    • Singularity Cloud Security
      Block Attacks with an AI-Powered CNAPP
    • Singularity Cloud Native Security
      Secure Cloud and Development Resources
    • Singularity Cloud Workload Security
      Real-Time Cloud Workload Protection Platform
    • Singularity Cloud Data Security
      AI-Powered Threat Detection for Cloud Storage
    • Singularity Cloud Security Posture Management
      Detect and Remediate Cloud Misconfigurations
    Securing AI
    • Prompt Security
      Secure AI Tools Across Your Enterprise
  • Why SentinelOne?
    Why SentinelOne?
    • Why SentinelOne?
      Cybersecurity Built for What’s Next
    • Our Customers
      Trusted by the World’s Leading Enterprises
    • Industry Recognition
      Tested and Proven by the Experts
    • About Us
      The Industry Leader in Autonomous Cybersecurity
    Compare SentinelOne
    • Arctic Wolf
    • Broadcom
    • CrowdStrike
    • Cybereason
    • Microsoft
    • Palo Alto Networks
    • Sophos
    • Splunk
    • Trellix
    • Trend Micro
    • Wiz
    Verticals
    • Energy
    • Federal Government
    • Finance
    • Healthcare
    • Higher Education
    • K-12 Education
    • Manufacturing
    • Retail
    • State and Local Government
  • Services
    Managed Services
    • Managed Services Overview
      Wayfinder Threat Detection & Response
    • Threat Hunting
      World-Class Expertise and Threat Intelligence
    • Managed Detection & Response
      24/7/365 Expert MDR Across Your Entire Environment
    • Incident Readiness & Response
      DFIR, Breach Readiness, & Compromise Assessments
    Support, Deployment, & Health
    • Technical Account Management
      Customer Success with Personalized Service
    • SentinelOne GO
      Guided Onboarding & Deployment Advisory
    • SentinelOne University
      Live and On-Demand Training
    • Services Overview
      Comprehensive Solutions for Seamless Security Operations
    • SentinelOne Community
      Community Login
  • Partners
    Our Network
    • MSSP Partners
      Succeed Faster with SentinelOne
    • Singularity Marketplace
      Extend the Power of S1 Technology
    • Cyber Risk Partners
      Enlist Pro Response and Advisory Teams
    • Technology Alliances
      Integrated, Enterprise-Scale Solutions
    • SentinelOne for AWS
      Hosted in AWS Regions Around the World
    • Channel Partners
      Deliver the Right Solutions, Together
    • SentinelOne for Google Cloud
      Unified, Autonomous Security Giving Defenders the Advantage at Global Scale
    • Partner Locator
      Your Go-to Source for Our Top Partners in Your Region
    Partner Portal→
  • Resources
    Resource Center
    • Case Studies
    • Data Sheets
    • eBooks
    • Reports
    • Videos
    • Webinars
    • Whitepapers
    • Events
    View All Resources→
    Blog
    • Feature Spotlight
    • For CISO/CIO
    • From the Front Lines
    • Identity
    • Cloud
    • macOS
    • SentinelOne Blog
    Blog→
    Tech Resources
    • SentinelLABS
    • Ransomware Anthology
    • Cybersecurity 101
  • About
    About SentinelOne
    • About SentinelOne
      The Industry Leader in Cybersecurity
    • Investor Relations
      Financial Information & Events
    • SentinelLABS
      Threat Research for the Modern Threat Hunter
    • Careers
      The Latest Job Opportunities
    • Press & News
      Company Announcements
    • Cybersecurity Blog
      The Latest Cybersecurity Threats, News, & More
    • FAQ
      Get Answers to Our Most Frequently Asked Questions
    • DataSet
      The Live Data Platform
    • S Foundation
      Securing a Safer Future for All
    • S Ventures
      Investing in the Next Generation of Security, Data and AI
  • Pricing
Get StartedContact Us
CVE Vulnerability Database
Vulnerability Database/CVE-2024-27302

CVE-2024-27302: Go-zero Auth Bypass Vulnerability

CVE-2024-27302 is an authentication bypass flaw in Go-zero framework caused by improper CORS origin validation. Attackers can break CORS policy to make unauthorized requests. This article covers technical details, impact, and fixes.

Published: April 8, 2026

CVE-2024-27302 Overview

CVE-2024-27302 is a CORS (Cross-Origin Resource Sharing) policy bypass vulnerability in go-zero, a popular web and RPC framework written in Go. The vulnerability exists in the isOriginAllowed function which improperly validates allowed origins using strings.HasSuffix, allowing attackers to bypass CORS restrictions by registering malicious domains that end with the same suffix as legitimate allowed domains.

Critical Impact

This vulnerability enables attackers to bypass CORS policy entirely, allowing malicious web pages to make unauthorized requests and retrieve sensitive data on behalf of authenticated users, potentially leading to complete compromise of user sessions and data.

Affected Products

  • go-zero versions prior to 1.4.4
  • Applications using go-zero's CORS Filter with configured allowed domains
  • Web services relying on go-zero's origin validation for CORS protection

Discovery Timeline

  • 2024-03-06 - CVE-2024-27302 published to NVD
  • 2025-12-03 - Last updated in NVD database

Technical Details for CVE-2024-27302

Vulnerability Analysis

The vulnerability resides in the CORS handling logic within go-zero's rest/internal/cors/handlers.go file. The framework allows developers to configure a CORS filter with an array of allowed domains. However, the origin validation mechanism uses Go's strings.HasSuffix function to check if the incoming request's origin matches any allowed domain.

This implementation is fundamentally flawed because suffix matching does not properly validate domain boundaries. For example, if an application configures example.com as an allowed origin, an attacker could register maliciousexample.com which would pass the suffix check since it ends with example.com. This allows the attacker's domain to be treated as a legitimate origin.

Root Cause

The root cause is improper input validation in the origin checking logic. The isOriginAllowed function relied on simple string suffix matching without ensuring that the match occurs at a proper domain boundary (e.g., preceded by a dot). This represents CWE-639 (Authorization Bypass Through User-Controlled Key), as the user-controlled origin header can bypass authorization checks through crafted domain names.

Attack Vector

An attacker can exploit this vulnerability through the following attack flow:

  1. Identify a target application using go-zero with CORS restrictions configured for specific domains (e.g., trusted.com)
  2. Register a malicious domain ending with the allowed origin suffix (e.g., attackertrusted.com)
  3. Host a malicious webpage on the attacker-controlled domain
  4. When a victim visits the attacker's page, the malicious JavaScript can make cross-origin requests to the target application
  5. Due to the flawed suffix check, the target application's CORS policy accepts the malicious origin as valid
  6. The attacker can now access sensitive data and perform actions on behalf of the authenticated user
go
// Vulnerable code (before patch) in rest/internal/cors/handlers.go
func isOriginAllowed(allows []string, origin string) bool {
	for _, o := range allows {
		if o == allOrigins {
			return true
		}

		if strings.HasSuffix(origin, o) {
			return true
		}
	}
	return false
}

// Fixed code (after patch) - adds proper domain boundary check
func isOriginAllowed(allows []string, origin string) bool {
	origin = strings.ToLower(origin)
	for _, allow := range allows {
		if allow == allOrigins {
			return true
		}

		allow = strings.ToLower(allow)
		if origin == allow {
			return true
		}

		if strings.HasSuffix(origin, "."+allow) {
			return true
		}
	}
	return false
}

Source: GitHub Commit Detail

Detection Methods for CVE-2024-27302

Indicators of Compromise

  • Unusual cross-origin requests from domains that share suffix patterns with allowed origins
  • CORS preflight requests with suspicious Origin headers containing allowed domain names as suffixes
  • Access logs showing requests with Origin headers from unexpected domains that were not blocked

Detection Strategies

  • Review application logs for CORS requests from origins that end with configured allowed domains but are not exact matches or proper subdomains
  • Implement monitoring for cross-origin requests from newly registered domains that share naming patterns with your allowed origins
  • Audit go-zero version in your dependency tree using go list -m all | grep go-zero to identify vulnerable installations

Monitoring Recommendations

  • Monitor web server access logs for unusual patterns in the Origin request header
  • Set up alerts for CORS requests from domains not explicitly in your allowlist
  • Implement Content Security Policy (CSP) headers as an additional layer of protection

How to Mitigate CVE-2024-27302

Immediate Actions Required

  • Upgrade go-zero to version 1.4.4 or later immediately
  • Review CORS configuration to ensure proper domain restrictions are in place
  • Audit application logs for any suspicious cross-origin activity that may indicate prior exploitation
  • Consider implementing additional origin validation at the application layer as defense in depth

Patch Information

The vulnerability is fixed in go-zero version 1.4.4. The fix modifies the isOriginAllowed function to properly validate domain boundaries by checking for exact matches or ensuring the origin ends with a dot followed by the allowed domain (.+allow). The patch also adds case-insensitive comparison for origin matching.

Apply the patch by updating your go.mod file:

bash
go get github.com/zeromicro/go-zero@v1.4.4

For more details, see the GitHub Security Advisory and the patch commit.

Workarounds

  • If immediate upgrade is not possible, implement additional origin validation logic in your application middleware before requests reach go-zero's CORS handler
  • Use an external reverse proxy (such as nginx or Cloudflare) with strict CORS configuration to filter requests before they reach the application
  • Restrict sensitive API endpoints to require additional authentication mechanisms beyond CORS, such as API tokens or CSRF tokens
bash
# Verify your go-zero version and upgrade
go list -m github.com/zeromicro/go-zero
go get github.com/zeromicro/go-zero@v1.4.4
go mod tidy

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechGo Zero

  • SeverityCRITICAL

  • CVSS Score9.1

  • EPSS Probability0.25%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityNone
  • CWE References
  • CWE-639
  • Vendor Resources
  • GitHub Commit Detail

  • GitHub Security Advisory
  • Latest CVEs
  • CVE-2026-40322: SiYuan Knowledge Management RCE Vulnerability

  • CVE-2026-40318: SiYuan Path Traversal Vulnerability

  • CVE-2026-40259: SiYuan Auth Bypass Vulnerability

  • CVE-2026-40255: AdonisJS HTTP Server CSRF Vulnerability
Default Legacy - Prefooter | Experience the World’s Most Advanced Cybersecurity Platform

Experience the World’s Most Advanced Cybersecurity Platform

See how our intelligent, autonomous cybersecurity platform can protect your organization now and into the future.

Try SentinelOne
  • Get Started
  • Get a Demo
  • Product Tour
  • Why SentinelOne
  • Pricing & Packaging
  • FAQ
  • Contact
  • Contact Us
  • Customer Support
  • SentinelOne Status
  • Language
  • Platform
  • Singularity Platform
  • Singularity Endpoint
  • Singularity Cloud
  • Singularity AI-SIEM
  • Singularity Identity
  • Singularity Marketplace
  • Purple AI
  • Services
  • Wayfinder TDR
  • SentinelOne GO
  • Technical Account Management
  • Support Services
  • Verticals
  • Energy
  • Federal Government
  • Finance
  • Healthcare
  • Higher Education
  • K-12 Education
  • Manufacturing
  • Retail
  • State and Local Government
  • Cybersecurity for SMB
  • Resources
  • Blog
  • Labs
  • Case Studies
  • Videos
  • Product Tours
  • Events
  • Cybersecurity 101
  • eBooks
  • Webinars
  • Whitepapers
  • Press
  • News
  • Ransomware Anthology
  • Company
  • About Us
  • Our Customers
  • Careers
  • Partners
  • Legal & Compliance
  • Security & Compliance
  • Investor Relations
  • S Foundation
  • S Ventures

©2026 SentinelOne, All Rights Reserved.

Privacy Notice Terms of Use

English