Vulnerabilities in pkg:golang/github.com/rs/cors

PACKAGE
Advisory Identifier: GHSA-mh55-gqvf-xfwm
Advisory Summary

CVE-2025-47908 is a MODERATE denial of service vulnerability (CWE-770: Allocation of Resources Without Limits or Throttling) affecting Github.com/rs/cors libraries in the Go ecosystem. The issue involves denial of service via malicious preflight requests in github.com/rs/cors. Remediation is available by upgrading affected packages to version 1.11.0.

3 Known Advisory Record(s)
Package Vulnerability Intelligence

pkg:golang/github.com/rs/cors

3 Known Advisory Record(s)

Vulnerability advisories affecting package pkg:golang/github.com/rs/cors. Select an advisory below to view technical details or fixes.

Advisory ID CVE / NVD Severity Summary
GHSA-mh55-gqvf-xfwm CVE-2025-47908 MODERATE Denial of service via malicious preflight requests in github.com/rs/cors
GHSA-vh9x-phq6-fx54 - LOW Duplicate Advisory: Denial of service via malicious preflight requests in github.com/rs/cors
GHSA-927h-x4qj-r242 CVE-2018-20744 MODERATE github.com/gofiber/fiber/v2 vulnerable to Origin Validation Error

CVE-2025-47908 at a Glance

CVE Identifier CVE-2025-47908
GHSA Identifier GHSA-mh55-gqvf-xfwm
Severity MODERATE
CVSS v3.1 Base Score N/A
CWE Classification CWE-770: Allocation of Resources Without Limits or Throttling
Affected Product Github.com/rs/cors
Package Ecosystem Go
Published Date
Last Updated

How to Fix CVE-2025-47908

To remediate this vulnerability, upgrade all affected Github.com/rs/cors dependencies to a patched release. Both direct and transitive dependencies should be checked, as frameworks or security libraries may pull in vulnerable versions transitively.

github.com/rs/cors fixed: 1.11.0
Upgrade github.com/rs/cors to 1.11.0
Verify Direct and Transitive Dependencies

Run the following command in your project directory to verify that all resolved dependencies use the patched release:

inspect dependencies for github.com/rs/cors

How to Check if You Are Affected

To determine whether your application is affected by CVE-2025-47908, inspect your project dependencies for Github.com/rs/cors:

inspect dependencies for github.com/rs/cors

Analyze the terminal output to locate any version of Github.com/rs/cors in your dependency tree. If any resolved version matches the vulnerable ranges listed in the table below (for example, versions earlier than 1.11.0), your application is affected.

Note: Verify declared build manifests and deployed runtime container environments.

Technical Details

Vulnerability Mechanism & Technical Analysis

This vulnerability is classified under CWE-770: Allocation of Resources Without Limits or Throttling, where the product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated. In Github.com/rs/cors, software state validation or input boundaries are circumvented during processing. Review the official source advisory statement below for specific affected components, classes, and reproduction details.

Source Advisory Statement

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.

CVE-2025-47908 Affected Github.com/rs/cors Versions

1 component(s)
Fixed Versions:
1.11.0
Product / Package Ecosystem Affected Versions Fixed Version
github.com/rs/cors
Go
≥ 1.9.0
< 1.11.0
1.11.0

References

Frequently Asked Questions

What is CVE-2025-47908?
CVE-2025-47908 is a security vulnerability in Github.com/rs/cors involving Denial of service via malicious preflight requests in github.com/rs/cors under CWE-770: Allocation of Resources Without Limits or Throttling.
Which Github.com/rs/cors versions are affected?
Affected versions include releases prior to 1.11.0 across affected packages: github.com/rs/cors.
What version fixes CVE-2025-47908?
Upgrading to 1.11.0 (or the latest patched release for your respective branch) resolves the vulnerability.
Is github.com/rs/cors affected?
Yes, github.com/rs/cors is affected in releases prior to 1.11.0. Upgrade your dependency to 1.11.0 or later.
What CWE is associated with CVE-2025-47908?
CVE-2025-47908 is classified under CWE-770: Allocation of Resources Without Limits or Throttling (The product allocates a reusable resource or group of resources on behalf of an actor without imposing any intended restrictions on the size or number of resources that can be allocated.).
How can I check Go dependencies for CVE-2025-47908?
Run the dependency tree command: 'inspect dependencies for github.com/rs/cors'. This command lists direct and transitive dependencies in your build configuration so you can verify if a vulnerable version is resolved.
Machine-readable OSV JSON OSV v1.5 Schema
Normalized schema output
{
  "schema_version" : "1.4.0",
  "id" : "GHSA-mh55-gqvf-xfwm",
  "modified" : "2025-08-06T22:10:52Z",
  "published" : "2024-07-05T19:42:48Z",
  "aliases" : [ "CVE-2025-47908" ],
  "summary" : "Denial of service via malicious preflight requests in github.com/rs/cors",
  "details" : "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.",
  "severity" : [ ],
  "affected" : [ {
    "package" : {
      "ecosystem" : "Go",
      "name" : "github.com/rs/cors"
    },
    "ranges" : [ {
      "type" : "ECOSYSTEM",
      "events" : [ {
        "introduced" : "1.9.0"
      }, {
        "fixed" : "1.11.0"
      } ]
    } ]
  } ],
  "references" : [ {
    "type" : "ADVISORY",
    "url" : "https://nvd.nist.gov/vuln/detail/CVE-2025-47908"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rs/cors/issues/170"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rs/cors/pull/171"
  }, {
    "type" : "WEB",
    "url" : "https://github.com/rs/cors/commit/4c32059b2756926619f6bf70281b91be7b5dddb2"
  }, {
    "type" : "PACKAGE",
    "url" : "https://github.com/rs/cors"
  }, {
    "type" : "WEB",
    "url" : "https://pkg.go.dev/vuln/GO-2024-2883"
  } ],
  "database_specific" : {
    "cwe_ids" : [ "CWE-770" ],
    "severity" : "MODERATE",
    "github_reviewed" : true,
    "github_reviewed_at" : "2024-07-05T19:42:48Z",
    "nvd_published_at" : null
  }
}