LowGO-2024-2955CVE-2019-25211GHSA-869c-j7wc-8jqv
Gin mishandles a wildcard in the origin string in github.com/gin-contrib/cors
Published 2 Jul 2024 · Updated 2 Jul 2024
Is your project on an affected github.com/gin-contrib/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.6.0
- Fixed in
- 1.6.0
Update to the fixed version for your release line, for example:
go get github.com/gin-contrib/cors@v1.6.0Details
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/* .
Is GO-2024-2955 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/gin-contrib/cors, and gives you the command that fixes it.
References
- Advisorygithub.com/advisories/GHSA-869c-j7wc-8jqv
- Fixgithub.com/gin-contrib/cors/commit/27b723a473efd80d5a498fa9f5933c80204c850d
- Fixgithub.com/gin-contrib/cors/pull/106
- Fixgithub.com/gin-contrib/cors/pull/57
- Linkgithub.com/gin-contrib/cors/compare/v1.5.0...v1.6.0
- Linkgithub.com/gin-contrib/cors/releases/tag/v1.6.0
Advisory data from OSV.dev (opens OSV.dev in a new tab), refreshed daily.