CVE-2024-25124
Fiber has Insecure CORS Configuration, Allowing Wildcard Origin with Credentials
- Published
- Updated
- Reserved
- 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.
Scores
| Scored by | CVSS | Score | Vector |
|---|---|---|---|
| GitHub_MCNA (assigner) | 3.1 | Critical9.4 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L |
| NVDNVD · Analyzed | 3.1 | Critical9.8 | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H |
- EPSS (exploitation in 30 days)
- 0.66% · top 48% of all CVEs (6 Nov 2026)
- CISA SSVC
- Exploitation: poc · Automatable: no · Technical impact: total
The list uses the assigner's score when there is one, then CISA's, then NVD's: Critical 9.4.
Weakness
Affected products
Affected packages
From reviewed advisories of the GitHub Advisory Database.
- Gogithub.com/gofiber/fiber/v2GHSA-fmg4-x8pw-hjhg (opens in a new tab)
References (8)
- https://github.com/gofiber/fiber/security/advisories/GHSA-fmg4-x8pw-hjhg (opens in a new tab)x_refsource_CONFIRMx_transferred
- https://github.com/gofiber/fiber/commit/f0cd3b44b086544a37886232d0530601f2406c23 (opens in a new tab)x_refsource_MISCx_transferred
- https://codeql.github.com/codeql-query-help/javascript/js-cors-misconfiguration-for-credentials (opens in a new tab)x_refsource_MISCx_transferred
- https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSNotSupportingCredentials (opens in a new tab)x_refsource_MISCx_transferred
- https://fetch.spec.whatwg.org/#cors-protocol-and-credentials (opens in a new tab)x_refsource_MISCx_transferred
- https://github.com/gofiber/fiber/releases/tag/v2.52.1 (opens in a new tab)x_refsource_MISCx_transferred
- https://saturncloud.io/blog/cors-cannot-use-wildcard-in-accesscontrolalloworigin-when-credentials-flag-is-true (opens in a new tab)x_refsource_MISCx_transferred
- http://blog.portswigger.net/2016/10/exploiting-cors-misconfigurations-for.html (opens in a new tab)x_refsource_MISCx_transferred
Sources
The same CVE in the primary databases and aggregators, to check against.
- CVE.org record (opens in a new tab)
- CVE List JSON (GitHub) (opens in a new tab)
- NVD (opens in a new tab)
- FIRST EPSS (opens in a new tab)
- OSV.dev (opens in a new tab)
- GitHub Advisory GHSA-fmg4-x8pw-hjhg (opens in a new tab)
- CIRCL Vulnerability-Lookup (opens in a new tab)
Badge for a README or a ticket
[](https://trackcve.app/cve/CVE-2024-25124)Record last updated .