CVE-2019-25211 — Vulnerability in github.com/gin-gonic/gin
Gin mishandles a wildcard at the end of an origin string
What Should I Do?
Address in Next Maintenance Window
Low exploitation probability (0.43%). Schedule for your next planned update.
Does your project use an affected github.com/gin-gonic/gin version?
Paste your go.sum to check it for CVE-2019-25211 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.
Summary
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.
Advisory Timeline
- First published June 29, 2024 (880 days ago).
- Last revised November 3, 2025 — 493 days after initial publication.
Remediation
Upgrade to the fixed version using your package manager.
go get github.com/gin-gonic/gin@v1.6.0
go get github.com/gin-contrib/cors@v1.6.0
After upgrading, scan your dependencies again to confirm the vulnerability is resolved.
Affected Packages (2)
Affects 1 ecosystem: Go (2).
| Package | Fixed In |
|---|---|
| github.com/gin-gonic/gin Go · Affected: All versions | 1.6.0 |
| github.com/gin-contrib/cors Go · Affected: All versions | 1.6.0 |
Vulnerability Classification
Common Weakness Enumeration (CWE) identifiers for this vulnerability type.
- CWE-346Origin Validation ErrorMITRE
CVSS Score Breakdown
What the CVSS (Common Vulnerability Scoring System) 9.1 score means for each attack dimension.
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
References
- https://nvd.nist.gov/vuln/detail/CVE-2019-25211ADVISORY
- https://github.com/gin-contrib/cors/pull/106WEB
- https://github.com/gin-contrib/cors/pull/57WEB
- https://github.com/gin-contrib/cors/commit/27b723a473efd80d5a498fa9f5933c80204c850dWEB
- https://github.com/gin-contrib/cors/compare/v1.5.0...v1.6.0WEB
- https://github.com/gin-contrib/cors/releases/tag/v1.6.0WEB
- https://github.com/gin-gonic/ginPACKAGE
- https://lists.debian.org/debian-lts-announce/2025/08/msg00024.htmlWEB
Frequently Asked Questions
- What is CVE-2019-25211?
- Gin mishandles a wildcard at the end of an origin string. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.1/10).
- How do I check if my project is affected by CVE-2019-25211?
- CVE-2019-25211 affects github.com/gin-gonic/gin and github.com/gin-contrib/cors. It has a 0.4% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2019-25211 and 200,000+ other known vulnerabilities.
Severity & Exploitability
Maximum impact if exploited, often with little effort or access required.
This is a below-median EPSS score — only 29.2% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.
Also Known As
Related CVEs
- CVE-2026-104099CRITICAL
Fabio: Access-control bypass through unnormalized request paths
- CVE-2026-77369CRITICAL
Daptin: Broken Access Control (IDOR) in the generic YJS collaboration endpoint
- CVE-2020-28483HIGH
Inconsistent Interpretation of HTTP Requests in github.com/gin-gonic/gin
- CVE-2023-29401MEDIUM
Gin Web Framework does not properly sanitize filename parameter of Context.FileAttachment function
- CVE-2023-26125MEDIUM
Improper input validation in github.com/gin-gonic/gin
- CVE-2020-28483
Inconsistent interpretation of HTTP Requests in github.com/gin-gonic/gin
- CVE-2023-29401
Improper handling of filenames in Content-Disposition HTTP header in github.com/gin-gonic/gin