Vulnerabilites related to github.com/rs/cors - github.com/rs/cors
CVE-2025-47908 (GCVE-0-2025-47908)
Vulnerability from cvelistv5
Published
2025-08-06 20:41
Modified
2025-08-07 13:47
Summary
Middleware causes a prohibitive amount of heap allocations when processing malicious preflight requests that include a Access-Control-Request-Headers (ACRH) header whose value contains many commas. This behavior can be abused by attackers to produce undue load on the middleware/server as an attempt to cause a denial of service.
Impacted products
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "cvssV3_1": {
              "attackComplexity": "LOW",
              "attackVector": "NETWORK",
              "availabilityImpact": "HIGH",
              "baseScore": 7.5,
              "baseSeverity": "HIGH",
              "confidentialityImpact": "NONE",
              "integrityImpact": "NONE",
              "privilegesRequired": "NONE",
              "scope": "UNCHANGED",
              "userInteraction": "NONE",
              "vectorString": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H",
              "version": "3.1"
            }
          },
          {
            "other": {
              "content": {
                "id": "CVE-2025-47908",
                "options": [
                  {
                    "Exploitation": "poc"
                  },
                  {
                    "Automatable": "yes"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2025-08-07T13:46:29.844868Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2025-08-07T13:47:15.232Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      }
    ],
    "cna": {
      "affected": [
        {
          "collectionURL": "https://pkg.go.dev",
          "defaultStatus": "unaffected",
          "packageName": "github.com/rs/cors",
          "product": "github.com/rs/cors",
          "programRoutines": [
            {
              "name": "Cors.handlePreflight"
            },
            {
              "name": "Cors.areHeadersAllowed"
            },
            {
              "name": "New"
            },
            {
              "name": "splitHeaderValues"
            },
            {
              "name": "AllowAll"
            },
            {
              "name": "Cors.HandlerFunc"
            },
            {
              "name": "Cors.ServeHTTP"
            },
            {
              "name": "Default"
            }
          ],
          "vendor": "github.com/rs/cors",
          "versions": [
            {
              "lessThan": "1.11.0",
              "status": "affected",
              "version": "1.9.0",
              "versionType": "semver"
            }
          ]
        }
      ],
      "credits": [
        {
          "lang": "en",
          "value": "@jub0bs"
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "Middleware causes a prohibitive amount of heap allocations when processing malicious preflight requests that include a Access-Control-Request-Headers (ACRH) header whose value contains many commas. This behavior can be abused by attackers to produce undue load on the middleware/server as an attempt to cause a denial of service."
        }
      ],
      "problemTypes": [
        {
          "descriptions": [
            {
              "description": "CWE-1325: Improperly Controlled Sequential Memory Allocation",
              "lang": "en"
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-08-06T20:41:31.311Z",
        "orgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
        "shortName": "Go"
      },
      "references": [
        {
          "url": "https://github.com/rs/cors/pull/171"
        },
        {
          "url": "https://github.com/rs/cors/issues/170"
        },
        {
          "url": "https://pkg.go.dev/vuln/GO-2024-2883"
        }
      ],
      "title": "Denial of service via malicious preflight requests in github.com/rs/cors"
    }
  },
  "cveMetadata": {
    "assignerOrgId": "1bb62c36-49e3-4200-9d77-64a1400537cc",
    "assignerShortName": "Go",
    "cveId": "CVE-2025-47908",
    "datePublished": "2025-08-06T20:41:31.311Z",
    "dateReserved": "2025-05-13T23:31:29.597Z",
    "dateUpdated": "2025-08-07T13:47:15.232Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1"
}