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-25124

CVE-2024-25124: Gofiber Fiber Auth Bypass Vulnerability

CVE-2024-25124 is an authentication bypass vulnerability in Gofiber Fiber's CORS middleware that allows insecure wildcard configurations with credentials enabled, potentially exposing sensitive data to unauthorized access.

Published: April 15, 2026

CVE-2024-25124 Overview

CVE-2024-25124 is a critical security vulnerability in the Fiber web framework for Go that allows insecure CORS (Cross-Origin Resource Sharing) configurations. The CORS middleware permits setting the Access-Control-Allow-Origin header to a wildcard (*) while simultaneously having Access-Control-Allow-Credentials set to true. This configuration directly violates security best practices and can expose applications to multiple CORS-related attacks.

Critical Impact

Applications using vulnerable versions of GoFiber may inadvertently allow unauthorized cross-origin requests with credentials, potentially leading to unauthorized access to sensitive user data, session hijacking, and other credential-based attacks.

Affected Products

  • GoFiber Fiber versions prior to v2.52.1
  • Applications using the CORS middleware with wildcard origins and credentials enabled
  • Go applications built with vulnerable Fiber framework releases

Discovery Timeline

  • 2024-02-21 - CVE-2024-25124 published to NVD
  • 2025-02-05 - Last updated in NVD database

Technical Details for CVE-2024-25124

Vulnerability Analysis

This vulnerability exists in the CORS middleware implementation within the GoFiber web framework. The core issue is that the middleware fails to enforce the CORS specification requirement that prohibits combining wildcard origins with credential support. According to the WHATWG Fetch CORS Specification, when Access-Control-Allow-Credentials is set to true, the Access-Control-Allow-Origin header must explicitly specify the requesting origin rather than using a wildcard.

The vulnerability is classified under CWE-346 (Origin Validation Error), as the middleware does not properly validate or restrict origin configurations when credentials are enabled. While browsers themselves will block these insecure responses, the misconfiguration at the server level exposes the application to attacks from non-browser clients or scenarios where CORS policies are not strictly enforced.

Root Cause

The root cause lies in the CORS middleware's configuration validation logic. Prior to the patch, the middleware allowed developers to configure AllowOrigins: "*" and AllowCredentials: true simultaneously without any warning or enforcement. The AllowOriginsFunc callback also lacked proper documentation and validation to prevent returning wildcard patterns when credentials were enabled.

The patch introduces validation to ensure that when AllowCredentials is set to true, wildcard origins will not have the access-control-allow-credentials header set to true, effectively preventing the insecure configuration from being applied.

Attack Vector

The attack vector is network-based and requires no authentication or user interaction. An attacker can exploit this misconfiguration to perform cross-origin requests that include credentials (cookies, HTTP authentication, or client-side certificates) to the vulnerable application. This enables various attacks including:

  • Cross-Origin Data Theft: Stealing sensitive user information through malicious websites
  • Session Hijacking: Capturing session tokens sent with credentialed requests
  • CSRF Bypass: Circumventing CSRF protections by making authenticated cross-origin requests
  • Privilege Escalation: Performing actions on behalf of authenticated users
go
// Security patch in middleware/cors/cors.go
// Source: https://github.com/gofiber/fiber/commit/f0cd3b44b086544a37886232d0530601f2406c23

 	Next func(c *fiber.Ctx) bool
 
 	// AllowOriginsFunc defines a function that will set the 'access-control-allow-origin'
-	// response header to the 'origin' request header when returned true.
+	// response header to the 'origin' request header when returned true. This allows for
+	// dynamic evaluation of allowed origins. Note if AllowCredentials is true, wildcard origins
+	// will be not have the 'access-control-allow-credentials' header set to 'true'.
 	//
 	// Optional. Default: nil
 	AllowOriginsFunc func(origin string) bool
 
-	// AllowOrigin defines a list of origins that may access the resource.
+	// AllowOrigin defines a comma separated list of origins that may access the resource.
 	//
 	// Optional. Default value "*"
 	AllowOrigins string

Detection Methods for CVE-2024-25124

Indicators of Compromise

  • HTTP responses containing both Access-Control-Allow-Origin: * and Access-Control-Allow-Credentials: true headers simultaneously
  • Unusual cross-origin requests from unknown domains to authenticated endpoints in application logs
  • Unexpected session activity or data access patterns that may indicate cross-origin credential theft
  • Error logs indicating CORS policy violations from legitimate browsers attempting to enforce proper security

Detection Strategies

  • Implement HTTP response header monitoring to detect the insecure header combination of wildcard CORS origins with credentials enabled
  • Deploy static code analysis using tools like CodeQL to identify CORS misconfigurations in source code
  • Review GoFiber application dependencies to verify that github.com/gofiber/fiber/v2 is at version 2.52.1 or later
  • Configure web application firewalls (WAFs) to alert on or block responses with the insecure CORS header combination

Monitoring Recommendations

  • Enable detailed logging of CORS-related headers on all API endpoints handling authenticated requests
  • Set up alerts for cross-origin requests originating from untrusted or unexpected domains
  • Monitor for anomalous patterns of data exfiltration that could indicate exploitation of CORS vulnerabilities
  • Implement regular dependency scanning to detect outdated GoFiber versions in CI/CD pipelines

How to Mitigate CVE-2024-25124

Immediate Actions Required

  • Upgrade GoFiber to version 2.52.1 or later immediately by running go get github.com/gofiber/fiber/v2@v2.52.1
  • Audit all CORS middleware configurations to ensure wildcard origins are not combined with credential support
  • If immediate upgrade is not possible, manually validate CORS configurations to prevent the insecure combination
  • Review application logs for signs of potential exploitation before and during the patching process

Patch Information

GoFiber has released version 2.52.1 which contains a fix for this vulnerability. The patch modifies the CORS middleware to prevent the access-control-allow-credentials header from being set to true when wildcard origins are configured. The fix can be found in commit f0cd3b44b086544a37886232d0530601f2406c23. For complete details, refer to the GitHub Security Advisory GHSA-fmg4-x8pw-hjhg and the release notes for v2.52.1.

Workarounds

  • Manually validate all CORS configurations to ensure AllowOrigins does not contain * when AllowCredentials is set to true
  • Replace wildcard origins with an explicit allowlist of trusted domains when credentials are required
  • Implement a custom AllowOriginsFunc that validates origins against a secure allowlist before returning true
  • Consider disabling AllowCredentials entirely if cross-origin credential sharing is not a business requirement
bash
# Configuration example
# Update GoFiber to patched version
go get github.com/gofiber/fiber/v2@v2.52.1

# Verify the installed version
go list -m github.com/gofiber/fiber/v2

# Example secure CORS configuration in your application:
# app.Use(cors.New(cors.Config{
#     AllowOrigins:     "https://trusted-domain.com,https://another-trusted.com",
#     AllowCredentials: true,
#     AllowMethods:     "GET,POST,PUT,DELETE",
# }))

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

  • Vulnerability Details
  • TypeAuth Bypass

  • Vendor/TechGofiber

  • SeverityCRITICAL

  • CVSS Score9.8

  • EPSS Probability0.48%

  • Known ExploitedNo
  • CVSS Vector
  • CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H
  • Impact Assessment
  • ConfidentialityLow
  • IntegrityNone
  • AvailabilityHigh
  • CWE References
  • CWE-346
  • Technical References
  • PortSwigger Blog Post

  • CodeQL Query Documentation

  • MDN CORS Credentials Error

  • WHATWG Fetch CORS Specification

  • GitHub Fiber Release Note

  • SaturnCloud CORS Analysis
  • Vendor Resources
  • GitHub Fiber Commit

  • GitHub Security Advisory GHSA-fmg4-x8pw-hjhg
  • Related CVEs
  • CVE-2024-38513: Gofiber Fiber Auth Bypass Vulnerability

  • CVE-2026-25899: Gofiber Fiber DOS Vulnerability

  • CVE-2025-66565: Gofiber Utils Information Disclosure Flaw

  • CVE-2025-48075: Gofiber Fiber DOS 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