GitHub Advisoryadvisory · Go

GHSA-869c-j7wc-8jqv Gin mishandles a wildcard at the end of an origin string

CRITICAL Published 2024-06-29 Modified 2025-11-03 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