VYPR
Critical severity9.1NVD Advisory· Published Jun 29, 2024· Updated Apr 15, 2026

CVE-2019-25211

CVE-2019-25211

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 packages

Versions sourced from the GitHub Security Advisory.

PackageAffected versionsPatched versions
github.com/gin-gonic/ginGo
< 1.6.01.6.0
github.com/gin-contrib/corsGo
< 1.6.01.6.0

Patches

3
27b723a473ef

fixe(domain): wildcard parse bug (#106)

https://github.com/gin-contrib/corsBenjamin MitzkusMar 6, 2024via ghsa
1 file changed · +1 1
  • cors.go+1 1 modified
    @@ -138,7 +138,7 @@ func (c Config) parseWildcardRules() [][]string {
     			continue
     		}
     		if i == (len(o) - 1) {
    -			wRules = append(wRules, []string{o[:i-1], "*"})
    +			wRules = append(wRules, []string{o[:i], "*"})
     			continue
     		}
     
    

Vulnerability mechanics

Generated by null/stub on May 9, 2026. Inputs: CWE entries + fix-commit diffs from this CVE's patches. Citations validated against bundle.

References

8

News mentions

0

No linked articles in our index yet.