GitHub Advisoryadvisory · Go
GHSA-869c-j7wc-8jqv Gin mishandles a wildcard at the end of an origin string
CRITICAL
Official page ↗
- Aliases
- CVE-2019-25211
- Ecosystem
- Go
- Packages
- github.com/gin-gonic/gin, github.com/gin-contrib/cors
- Severity
- Critical
- CVSS vector
- CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- Weaknesses
- CWE-346
- Reviewed
- 2024-07-01
Affected packages
• Go github.com/gin-gonic/gin: < 1.6.0 → fixed in 1.6.0
• Go github.com/gin-contrib/cors: < 1.6.0 → fixed in 1.6.0
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.
Related
Alias · CVE (1)
- CVE-2019-25211 parseWildcardRules in Gin-Gonic CORS middleware before 1.6.0 mishandles a wildcard at the end of an origin string, e.g.,… vulnerability
Weakness · CWE (1)
- CWE-346 Origin Validation Error weakness
References
- https://nvd.nist.gov/vuln/detail/CVE-2019-25211 advisory
- https://github.com/gin-contrib/cors/pull/106 web
- https://github.com/gin-contrib/cors/pull/57 web
- https://github.com/gin-contrib/cors/commit/27b723a473efd80d5a498fa9f5933c80204c850d web
- https://github.com/gin-contrib/cors/compare/v1.5.0...v1.6.0 web
- https://github.com/gin-contrib/cors/releases/tag/v1.6.0 web
- https://github.com/gin-gonic/gin package
- https://lists.debian.org/debian-lts-announce/2025/08/msg00024.html web