CVE-2019-25211: Gin mishandles a wildcard at the end of an origin string
9.1
CVSS Score
3.1
Basic Information
CVE ID
GHSA ID
EPSS Score
0.33997%
CWE
Published
6/29/2024
Updated
3/14/2025
KEV Status
No
Technology
Go
Technical Details
CVSS Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
| Package Name | Ecosystem | Vulnerable Versions | First Patched Version |
|---|---|---|---|
| github.com/gin-gonic/gin | go | < 1.6.0 | 1.6.0 |
| github.com/gin-contrib/cors | go | < 1.6.0 | 1.6.0 |
Vulnerability Intelligence
Miggo AI
Root Cause Analysis
- The CVE description explicitly references 'parseWildcardRules' as the vulnerable function.
- The GitHub PR #106 and commit 27b723a show the fix modifies line 138 of cors.go, changing 'o[:i-1]' to 'o[:i]' for wildcard-at-end cases.
- Multiple independent reports (PR #57, #106) confirm the pattern matching logic error in this specific function.
- The vulnerability manifests in origin validation when processing CORS rules with trailing wildcards, directly tied to this function's string manipulation logic.