CVE-2024-25124
Fiber has Insecure CORS Configuration, Allowing Wildcard Origin with Credentials
Also known as GHSA-fmg4-x8pw-hjhg, GO-2024-2574
Mitigation
- Upgrade github.com/gofiber/fiber/v2 to 2.52.1 or later.
Who should check
- Projects that depend on Go package github.com/gofiber/fiber/v2 (< 2.52.1)
- Anyone running gofiber fiber < 2.52.1
Vulnerability facts
- Affected
- github.com/gofiber/fiber/v2 < 2.52.1
- Fixed in
- 2.52.1
- Exploited in the wild
- Not in CISA KEV
- Public exploit / PoC
- Yes: see the exploit references below
- Remote exploitation
- Remote, no login needed
- CVSS
- 9.4 (v3.1, CNA)CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:LOpen in CVSS calculator
Show all 8 CVSS metrics
- Attack vector: Network
- Attack complexity: Low
- Privileges required: None
- User interaction: None
- Scope: Unchanged
- Confidentiality impact: High
- Integrity impact: High
- Availability impact: Low
- EPSS
- 0.72% chance of exploitation in 30 days (percentile 50, 2026-11-26)
- CWE
- CWE-346, CWE-942
- Modified
Description
Fiber is a web framework written in go. Prior to version 2.52.1, the CORS middleware allows for insecure configurations that could potentially expose the application to multiple CORS-related vulnerabilities. Specifically, it allows setting the Access-Control-Allow-Origin header to a wildcard (`*`) while also having the Access-Control-Allow-Credentials set to true, which goes against recommended security best practices. The impact of this misconfiguration is high as it can lead to unauthorized access to sensitive user data and expose the system to various types of attacks listed in the PortSwigger article linked in the references. Version 2.52.1 contains a patch for this issue. As a workaround, users may manually validate the CORS configurations in their implementation to ensure that they do not allow a wildcard origin when credentials are enabled. The browser fetch api, as well as browsers and utilities that enforce CORS policies, are not affected by this.
Affected and fixed versions
| Package / product | Affected | Fixed | Source |
|---|---|---|---|
| Go github.com/gofiber/fiber/v2 | < 2.52.1 | 2.52.1 | osv |
| gofiber fiber | < 2.52.1 | — | cvelist |
Check your systems with an agent
Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.
Check whether anything I run is affected by CVE-2024-25124. Work read-only: do not install, upgrade, delete or change anything. Details: https://flawdb.com/CVE-2024-25124.md Affected: github.com/gofiber/fiber/v2 < 2.52.1 Fixed in: 2.52.1 Steps: 1. Search this machine and project for github.com/gofiber/fiber/v2 (Go), gofiber fiber: dependency manifests and lockfiles, installed packages, container images and running services. 2. For each match, note the installed version and whether it is inside the affected range. 3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
References
Vendor advisories
Other
- https://codeql.github.com/codeql-query-help/javascript/js-cors-misconfiguration-for-credentials
- https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSNotSupportingCredentials
- https://fetch.spec.whatwg.org/#cors-protocol-and-credentials
- https://github.com/gofiber/fiber/releases/tag/v2.52.1
- https://saturncloud.io/blog/cors-cannot-use-wildcard-in-accesscontrolalloworigin-when-credentials-flag-is-true
- https://github.com/gofiber/fiber
FAQ
Is CVE-2024-25124 being exploited?
There is no confirmed exploitation: CVE-2024-25124 is not in the CISA Known Exploited Vulnerabilities catalog. Public exploit code or a proof of concept is available. EPSS estimates a 0.72% chance of exploitation in the next 30 days (as of 2026-11-26).
How serious is CVE-2024-25124?
Critical: CVSS 9.4 (v3.1, scored by CNA). Remote, no login needed.
Which versions are affected by CVE-2024-25124?
github.com/gofiber/fiber/v2 < 2.52.1.
Is there a fix for CVE-2024-25124?
Yes. Fixed in 2.52.1. Upgrade github.com/gofiber/fiber/v2 to 2.52.1 or later.
How do I check if I'm affected by CVE-2024-25124?
Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.