CVE-2019-25211
Gin mishandles a wildcard at the end of an origin string
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.
Attack profile
How easy it is to exploit
- Attack vector
- Network
- Complexity
- Low
- Privileges needed
- None
- User interaction
- None
What an attacker can affect
- Confidentiality
- High
- Integrity
- High
- Availability
- None
Exploit likelihood
What each source reports
CVE List Score used
9.1
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.
- Record
CVE-2019-25211- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-346
- Updated
- 2026-11-02
EUVDEUVD-2024-1974
9.1
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.
- Record
EUVD-2024-1974- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Updated
- 2026-11-02
GitHub AdvisoriesGHSA-869c-j7wc-8jqv
9.3
Gin mishandles a wildcard at the end of an origin string
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.
- Record
GHSA-869c-j7wc-8jqv- CVSS 4.0
- 9.3 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N - CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-346
- Updated
- 2026-11-02
NVD
9.1
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.
- Record
CVE-2019-25211- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-346
- Updated
- 2026-11-02
OSV
9.1
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.
- Record
CVE-2019-25211- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Updated
- 2026-11-02
OSVDEBIAN-CVE-2019-25211
9.1
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.
- Record
DEBIAN-CVE-2019-25211- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Updated
- 2026-11-02
Show 4 moreShow less
OSVGHSA-869c-j7wc-8jqv
9.3
Gin mishandles a wildcard at the end of an origin string
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.
- Record
GHSA-869c-j7wc-8jqv- CVSS 4.0
- 9.3 Critical
CVSS:4.0/AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N - CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Weakness
- CWE-346
- Updated
- 2026-11-02
OSVUBUNTU-CVE-2019-25211
9.1
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.
- Record
UBUNTU-CVE-2019-25211- CVSS 3.1
- 9.1 Critical
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N - Updated
- 2026-11-04
OSVGO-2024-2955 No score
Gin mishandles a wildcard in the origin string in github.com/gin-contrib/cors
Gin-Gonic CORS middleware mishandles a wildcard at the end of an origin string. Examples: https://example.community/* is accepted by the origin string https://example.com/* and http://localhost.example.com/* is accepted by the origin string http://localhost/* .
- Record
GO-2024-2955- Updated
- 2026-11-02
OSVUSN-8983-1 No score
golang-github-gin-contrib-cors vulnerability
It was discovered that the Gin CORS middleware incorrectly handled wildcards at the end of origin strings. A remote attacker could possibly use this issue to bypass the configured origin restrictions.
- Record
USN-8983-1- Updated
- 2026-11-04
Affected products
Affected packages
| Package | Affected | Fixed |
|---|---|---|
github.com/gin-gonic/ginGo |
before 1.6.0 | 1.6.0 |
github.com/gin-contrib/corsGo |
before 1.6.0 | 1.6.0 |
golang-github-gin-contrib-corsDebian:12 |
before 1.4.0-1+deb12u1, plus listed versions 1.4.0-1 |
1.4.0-1+deb12u1 |
golang-github-gin-contrib-corsDebian:13 |
before 1.4.0-1+deb13u1, plus listed versions 1.4.0-1 |
1.4.0-1+deb13u1 |
golang-github-gin-contrib-corsDebian:11 |
before 1.3.1-1+deb11u1, plus listed versions 1.3.1-1 |
1.3.1-1+deb11u1 |
golang-github-gin-contrib-corsUbuntu:Pro:20.04:LTS |
before 1.3.0-2ubuntu0.1~esm1, plus listed versions 1.3.0-2 |
1.3.0-2ubuntu0.1~esm1 |
golang-github-gin-contrib-corsUbuntu:22.04:LTS |
before 1.3.1-1+deb11u1build0.22.04.1, plus listed versions 1.3.1-1 |
1.3.1-1+deb11u1build0.22.04.1 |
golang-github-gin-contrib-corsUbuntu:Pro:24.04:LTS |
before 1.4.0-1ubuntu0.1~esm1, plus listed versions 1.4.0-1 |
1.4.0-1ubuntu0.1~esm1 |
golang-github-gin-contrib-corsUbuntu:25.10 |
All versions, plus listed versions 1.4.0-1 |
None known |
History
| Recorded | Changed | Sources |
|---|---|---|
| affected, aliases, references | OSV | |
| affected, facts | OSV | |
| first indexed | CVE List, EUVD, GitHub Advisories, NVD, OSV |
Dates are when Every CVE recorded each change. Upstream dates may differ.
In short
CVE-2019-25211 is a critical vulnerability (CVSS 9.1) in Gin-contrib Cors, published June 28, 2024. No source lists public exploit code. EPSS puts the chance of exploitation in the next 30 days at 0.43%, the 37th percentile. Fixed in github.com/gin-gonic/gin 1.6.0.
References
github.com/gin-contrib/cors/pull/57
github.com/gin-contrib/cors/pull/106
github.com/gin-contrib/cors/compare/v1.5.0...v1.6.0
github.com/gin-contrib/cors/releases/tag/v1.6.0
github.com/gin-contrib/cors/commit/27b723a473efd80d5a498fa9f5933c80204c850d
lists.debian.org/debian-lts-announce/2025/08/msg00024.html