# CVE-2024-25124: Fiber has Insecure CORS Configuration, Allowing Wildcard Origin with Credentials

- Severity: Critical 9.4 (CVSS:3.1, scored by GitHub_M) `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.66%, higher than 52% of CVEs (2026-12-01)
- Public exploit code or proof of concept: 2 links below, marked "exploit"
- Published: 2024-02-21T21:01:44.672Z
- Modified: 2026-09-10T03:50:06.174Z
- Also known as: GHSA-fmg4-x8pw-hjhg, GO-2024-2574
- Weaknesses: CWE-346, CWE-942
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: GitHub_M

## 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.

(As written by CVE List.)

## Affected

- gofiber fiber: < 2.52.1; before 2.52.1
- github.com/gofiber/fiber/v2 (Go): before 2.52.1

## Every score

- GitHub_M: CVSS:3.1 9.4 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L`
- GitHub: CVSS:3.1 9.4 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L`
- NVD: CVSS:3.1 9.8 Critical `CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H`

## References

- <https://github.com/gofiber/fiber/security/advisories/GHSA-fmg4-x8pw-hjhg> (exploit, advisory, vendor-advisory, web)
- <http://blog.portswigger.net/2016/10/exploiting-cors-misconfigurations-for.html> (exploit, third-party-advisory, web)
- <https://github.com/gofiber/fiber/commit/f0cd3b44b086544a37886232d0530601f2406c23> (fix, patch, web)
- <https://codeql.github.com/codeql-query-help/javascript/js-cors-misconfiguration-for-credentials> (technical-description, web)
- <https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSNotSupportingCredentials> (technical-description, web)
- <https://fetch.spec.whatwg.org/#cors-protocol-and-credentials> (technical-description, web)
- <https://github.com/gofiber/fiber/releases/tag/v2.52.1> (release-notes, web)
- <https://saturncloud.io/blog/cors-cannot-use-wildcard-in-accesscontrolalloworigin-when-credentials-flag-is-true> (broken-link, web)
- <https://nvd.nist.gov/vuln/detail/CVE-2024-25124> (advisory)
- <https://github.com/gofiber/fiber> (package)

## Sources

- CVE List: [CVE-2024-25124](https://www.cve.org/CVERecord?id=CVE-2024-25124), CVE Terms of Use, modified 2024-08-26
- GitHub Advisory Database: [GHSA-fmg4-x8pw-hjhg](https://github.com/advisories/GHSA-fmg4-x8pw-hjhg), CC-BY-4.0, modified 2026-09-10
- Go Vulnerability Database: [GO-2024-2574](https://pkg.go.dev/vuln/GO-2024-2574), CC-BY-4.0, modified 2024-05-20
- NVD: [CVE-2024-25124](https://nvd.nist.gov/vuln/detail/CVE-2024-25124), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2024-25124 · Whole record: https://cve.day/CVE-2024-25124.json · Rebuilt by cve.day 2026-11-25T22:58:36.975Z
