Critical, CVSS 9.3GoPublished
Gin mishandles a wildcard at the end of an origin string
CVE-2019-25211 · GHSA-869c-j7wc-8jqv
- Affected
- Go github.com/gin-contrib/cors < 1.6.0
- Fixed in
- 1.6.0· Vendor fix available
- Issue
- parseWildcardRules in Gin-Gonic CORS middleware before 1.6.0 mishandles a wildcard at the end of an origin string, e.g., https://example.community/ is allowed when the intention is that only https://example.com/ should be allowed, and http://localhost.example.com/ is allowed when the intention is that only http://localhost/ should be allowed.
Recommended action: Upgrade to 1.6.0 or later, then redeploy and verify.A vendor fix does not resolve your finding until you verify it in your own systems.