Every CVE Search/ Get API key

CVE-2019-25211

Gin mishandles a wildcard at the end of an origin string

9.1 CriticalFix available

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

0.43%Up 0.4 points since Jun 29, 2024
90%50%10%1%

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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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 CriticalCVSS: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

Affected packages
PackageAffectedFixed
github.com/gin-gonic/gin
Go
before 1.6.0
1.6.0
github.com/gin-contrib/cors
Go
before 1.6.0
1.6.0
golang-github-gin-contrib-cors
Debian:12
before 1.4.0-1+deb12u1, plus listed versions
1.4.0-1
1.4.0-1+deb12u1
golang-github-gin-contrib-cors
Debian:13
before 1.4.0-1+deb13u1, plus listed versions
1.4.0-1
1.4.0-1+deb13u1
golang-github-gin-contrib-cors
Debian:11
before 1.3.1-1+deb11u1, plus listed versions
1.3.1-1
1.3.1-1+deb11u1
golang-github-gin-contrib-cors
Ubuntu: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-cors
Ubuntu: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-cors
Ubuntu: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-cors
Ubuntu:25.10
All versions, plus listed versions
1.4.0-1
None known

History

History
RecordedChangedSources
affected, aliases, referencesOSV
affected, factsOSV
first indexedCVE 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

Show 7 moreShow less
MoveEnter Open