CVE-2019-25211Published Jun 28, 2024 · Jun 28Updated Oct 20
Gin mishandles a wildcard at the end of an origin string
Critical9.1Fix available
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| github.com/gin-gonic/gin Go |
|
|
| github.com/gin-contrib/cors Go |
|
|
| Product | Affected | Fixed in |
|---|---|---|
| github.com/gin-gonic/gin Go |
|
|
| github.com/gin-contrib/cors Go |
|
|
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.
From the CVE record · mitre
Gin-Gonic CORS middleware before 1.6.0 mishandles wildcards at the end of configured origin strings. When a rule ends in a wildcard, an origin outside the intended scope can be allowed.
Check Go applications using github.com/gin-gonic/gin or github.com/gin-contrib/cors versions before 1.6.0.