GHSA-869c-j7wc-8jqvCriticalCVSS 9.1

Gin mishandles a wildcard at the end of an origin string

Published
June 29, 2024
Last Modified
November 3, 2025

🔗 CVE IDs covered (1)

📋 Description

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.

🎯 Affected products2

  • go/github.com/gin-gonic/gin:< 1.6.0
  • go/github.com/gin-contrib/cors:< 1.6.0

🔗 References (8)