Skip to content
Heist/ feed
Back to feed
Critical

Fiber has Insecure CORS Configuration, Allowing Wildcard Origin with Credentials

Type: advisorySources: OSV

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.

Products
Not specified
Affected versions
Not specified
Fixed versions
Not specified
CVEs
CVE-2024-25124
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 01:12 UTC · Revision 1

Source evidence

Fiber has Insecure CORS Configuration, Allowing Wildcard Origin with Credentials

core-osv · Original source

Published 21 Feb 2024, 21:01 UTC

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.

osv:CVE-2024-25124
Complete source record
{
  "id": "e4ffcf0aad9d84fe128af989db131a5f35f6185c3732e23fe819a4efb2e9165a",
  "url": "https://osv.dev/vulnerability/CVE-2024-25124",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "Fiber has Insecure CORS Configuration, Allowing Wildcard Origin with Credentials",
    "summary": "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.",
    "evidence": "osv:CVE-2024-25124",
    "products": [],
    "severity": "critical",
    "structured": {
      "id": "CVE-2024-25124",
      "aliases": [
        "CVE-2024-25124",
        "GHSA-fmg4-x8pw-hjhg",
        "GO-2024-2574"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:L"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://github.com/gofiber/fiber",
              "type": "GIT",
              "events": [
                {
                  "introduced": "0"
                },
                {
                  "fixed": "70f21d5f7eb486875d6f6f07c858c7d20e9b3f0a"
                },
                {
                  "fixed": "f0cd3b44b086544a37886232d0530601f2406c23"
                }
              ],
              "database_specific": {
                "extracted_events": [
                  {
                    "cpe": "cpe:2.3:a:gofiber:fiber:*:*:*:*:*:go:*:*",
                    "range": [
                      {
                        "introduced": "0"
                      },
                      {
                        "fixed": "2.52.1"
                      }
                    ],
                    "source": "CPE_RANGE"
                  },
                  {
                    "range": [
                      {
                        "fixed": "f0cd3b44b086544a37886232d0530601f2406c23"
                      }
                    ],
                    "source": "REFERENCES_COMMIT"
                  },
                  {
                    "range": [
                      {
                        "fixed": "70f21d5f7eb486875d6f6f07c858c7d20e9b3f0a"
                      }
                    ],
                    "source": "REFERENCES_TAG",
                    "original_tag": "v2.52.1"
                  }
                ]
              }
            }
          ],
          "versions": [
            "v2.52.0",
            "v2.51.0",
            "v2.50.0",
            "v2.49.2",
            "v2.49.1",
            "v2.49.0",
            "v2.48.0",
            "v2.47.0",
            "v2.46.0",
            "v2.45.0",
            "v2.44.0",
            "v2.43.0",
            "v2.42.0",
            "v2.41.0",
            "v2.40.1",
            "v2.40.0",
            "v2.39.0",
            "v2.38.1",
            "v2.38.0",
            "v2.37.1",
            "v2.37.0",
            "v2.37.0-rc.1",
            "v2.36.0",
            "v2.35.0",
            "v2.34.1",
            "v2.34.0",
            "v2.34.0-rc.1",
            "v2.33.0",
            "v2.32.0",
            "v2.31.0",
            "v2.30.0",
            "v2.29.0",
            "v2.28.0",
            "v2.27.0",
            "v2.26.0",
            "v2.25.0",
            "v2.24.0",
            "v2.23.0",
            "v2.22.0",
            "v2.21.0",
            "v2.20.2",
            "v2.20.1",
            "v2.20.0",
            "v2.19.0",
            "v2.18.0",
            "v2.17.0",
            "v2.16.0",
            "v2.15.0",
            "v2.14.0",
            "v2.13.0",
            "v2.12.0",
            "v2.11.0",
            "v2.10.0",
            "v2.9.0",
            "v2.8.0",
            "v2.7.1",
            "v2.7.0",
            "v2.6.0",
            "v2.4.1",
            "v2.5.0",
            "v2.4.0",
            "v2.3.3",
            "v2.3.2",
            "v2.3.1",
            "v2.3.0",
            "v2.2.5",
            "v2.2.4",
            "v2.2.3",
            "v2.2.2",
            "v2.2.1",
            "v2.2.0",
            "v2.1.4",
            "v2.1.3",
            "v2.1.2",
            "v1.14.6",
            "v2.1.1",
            "v2.1.0",
            "v2.0.6",
            "v2.0.5",
            "v2.0.4",
            "v2.0.3",
            "v2.0.2",
            "v2.0.1",
            "v2.0.0",
            "v1.14.5",
            "v1.14.4",
            "v1.14.3",
            "v1.14.2",
            "v1.14.1",
            "v1.13.3",
            "v1.13.2",
            "v1.13.1",
            "v1.13.0",
            "v1.12.6",
            "v1.12.5",
            "v1.12.4",
            "v1.12.3",
            "v1.12.2",
            "v1.12.1",
            "v1.12.0",
            "v1.11.1",
            "v1.11.0",
            "v1.10.5",
            "v1.10.0",
            "v1.9.6",
            "v1.9.3",
            "v1.9.2",
            "v1.9.1",
            "v1.9.0",
            "v1.8.43",
            "v1.8.42",
            "v1.8.41",
            "v1.8.4",
            "v1.8.3",
            "v1.8.2",
            "v1.8.1",
            "v1.8.0",
            "v1.7.1",
            "v1.0.0"
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-25124.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:48.635604942Z",
      "provider": "osv",
      "references": [
        "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://github.com/CVEProject/cvelistV5/tree/main/cves/2024/25xxx/CVE-2024-25124.json",
        "https://github.com/gofiber/fiber/security/advisories/GHSA-fmg4-x8pw-hjhg",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-25124",
        "https://github.com/gofiber/fiber/commit/f0cd3b44b086544a37886232d0530601f2406c23",
        "https://saturncloud.io/blog/cors-cannot-use-wildcard-in-accesscontrolalloworigin-when-credentials-flag-is-true"
      ],
      "provider_metadata": {
        "cwe_ids": [
          "CWE-346",
          "CWE-942"
        ],
        "cna_assigner": "GitHub_M",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/25xxx/CVE-2024-25124.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-25124",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 516885,
  "published_at": "2024-02-21T21:01:44.672+00:00"
}