{"id":"CVE-2024-25124","published":"2024-02-21T21:01:44Z","modified":"2024-08-26T14:39:19Z","title":"Fiber has Insecure CORS Configuration, Allowing Wildcard Origin with Credentials","vendor":"gofiber","product":"fiber","tier":"tail","description":{"text":"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.","provenance":"source","from":"CVE.org"},"cvss":{"score":9.4,"severity":"CRITICAL","version":"3.1","vector":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L","provenance":"source","from":"CVE.org CNA"},"epss":{"score":0.00655,"percentile":0.52293,"provenance":"source"},"cwes":[{"id":"CWE-346","name":"Origin Validation Error"},{"id":"CWE-942","name":"Permissive Cross-domain Security Policy with Untrusted Domains"}],"references":[{"url":"https://github.com/gofiber/fiber/security/advisories/GHSA-fmg4-x8pw-hjhg","tags":["x_refsource_CONFIRM"]},{"url":"https://github.com/gofiber/fiber/commit/f0cd3b44b086544a37886232d0530601f2406c23","tags":["x_refsource_MISC"]},{"url":"https://codeql.github.com/codeql-query-help/javascript/js-cors-misconfiguration-for-credentials","tags":["x_refsource_MISC"]},{"url":"https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSNotSupportingCredentials","tags":["x_refsource_MISC"]},{"url":"https://fetch.spec.whatwg.org/#cors-protocol-and-credentials","tags":["x_refsource_MISC"]},{"url":"https://github.com/gofiber/fiber/releases/tag/v2.52.1","tags":["x_refsource_MISC"]},{"url":"https://saturncloud.io/blog/cors-cannot-use-wildcard-in-accesscontrolalloworigin-when-credentials-flag-is-true","tags":["x_refsource_MISC"]},{"url":"http://blog.portswigger.net/2016/10/exploiting-cors-misconfigurations-for.html","tags":["x_refsource_MISC"]}],"priority":{"score":17.0,"factors":[{"name":"EPSS percentile","points":10.46},{"name":"CVSS severity","points":6.58}]},"vendorSlug":"gofiber","affectedVersions":[{"vendor":"gofiber","product":"fiber","versions":["< 2.52.1"]}],"ssvc":{"exploitation":"poc","automatable":"no","technicalImpact":"total","timestamp":"2024-02-22T16:40:32.534976Z","from":"CISA ADP","provenance":"source"},"affected":[{"ecosystem":"Go","package":"github.com/gofiber/fiber/v2","vulnerableRanges":["<2.52.1"],"patched":["2.52.1"],"from":["GHSA-fmg4-x8pw-hjhg","GO-2024-2574"],"provenance":"source"}],"summary":{"text":"The Fiber web framework for Go, specifically its CORS middleware, can be configured to return a wildcard (*) Access-Control-Allow-Origin header alongside Access-Control-Allow-Credentials set to true. An attacker positioned on the network can exploit this without authentication or user interaction, provided the application is configured this way, to make cross-origin requests that read sensitive data from authenticated users.","provenance":"ai","model":"claude-haiku-5-5","generatedAt":"2026-11-20T20:40:33Z"},"euvd":{"id":"EUVD-2024-0629","exploited":false,"provenance":"source"},"lineage":{"packageHistory":[{"cve":"CVE-2023-41338","published":"2023-09-08","fixed":"2.49.2-0.20230906112033-b8c9ede6efa2","kev":false},{"cve":"CVE-2023-45128","published":"2023-10-16","fixed":"2.50.0","kev":false,"link":{"from":"CVE-2023-45128","to":"CVE-2024-25124","relation":"successor","confidence":"low","kind":"sequence","evidence":[{"kind":"version-step","provenance":"source","package":"Go:github.com/gofiber/fiber/v2","fromFixed":"2.50.0","toFixed":"2.52.1","daysApart":128}]}},{"cve":"CVE-2023-45141","published":"2023-10-16","fixed":"2.50.0","kev":false},{"cve":"CVE-2024-25124","published":"2024-02-21","fixed":"2.52.1","kev":false},{"cve":"CVE-2026-119285","published":"2026-10-29","fixed":"2.52.3","kev":false},{"cve":"CVE-2024-38513","published":"2024-07-01","fixed":"2.52.5","kev":false},{"cve":"CVE-2025-48075","published":"2025-05-22","fixed":"2.52.7","kev":false}],"package":"Go:github.com/gofiber/fiber/v2"}}