ADVISORIES

Go Vulnerability Database

GO-2024-2955

Gin mishandles a wildcard in the origin string in github.com/gin-contrib/cors

Details

Gin-Gonic CORS middleware mishandles a wildcard at the end of an origin string. Examples: https://example.community/* is accepted by the origin string https://example.com/* and http://localhost.example.com/* is accepted by the origin string http://localhost/* .

Affected packages

EcosystemPackageAffected versions
Gogithub.com/gin-contrib/cors
All versions before 1.6.0 (fixed in 1.6.0)

References