MEDIUM5.9
GO-2023-1792
Insecure wildcard CORS policy in github.com/rs/cors
Quick fix
GO-2023-1792 — github.com/rs/cors: upgrade to the fixed version with the command below.
go get github.com/rs/cors@v1.5.0Details
The CORS handler actively converts a wildcard CORS policy into reflecting an arbitrary Origin header value, which is incompatible with the CORS security design, and could lead to CORS misconfiguration security problems.
Are you affected?
Enter the version of the package you're using.
Affected packages
References
Check it before you install it
One call answers whether to add this package: known advisories, CISA KEV, and whether the name is a hallucinated or freshly squatted one. No key needed to try it.
curl -s https://vdb.ai.kr/v1/ai/check-packages \
-H 'Content-Type: application/json' \
-d '{"packages":["pkg:golang/github.com/rs/cors"]}'