Denial of service via malicious preflight requests in github.com/rs/cors
Published 2 Jul 2024 · Updated 4 Feb 2026
Is your project on an affected github.com/rs/cors?
Look after several Go apps? Indie watches up to 15 repos, private ones too, for $5 a month. See Indie
Affected package
- Affected
- >=1.9.0 <1.11.0
- Fixed in
- 1.11.0
go get github.com/rs/cors@v1.11.0Details
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.
Is GO-2024-2883 in any of your client repos?
Checking one package by hand is fine. Checking it across forty client projects is not. NPMscan reads the lockfiles in every GitHub repo you pick, finds each project with an affected github.com/rs/cors, and gives you the command that fixes it.
More advisories for github.com/rs/cors
- LowCVE-2018-20744Insecure wildcard CORS policy in github.com/rs/cors · 8 Jun 2023
- MediumCVE-2018-20744github.com/gofiber/fiber/v2 vulnerable to Origin Validation Error · 14 May 2022
References
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.