golang-github-gin-contrib-cors — security advisory
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.
- Products
- golang-github-gin-contrib-cors
- Affected versions
- 1.3.0-2, 1.3.1-1, 1.4.0-1
- Fixed versions
- Not specified
- CVEs
- CVE-2019-25211
- Confirmed fixed CVEs
- Not specified
- Updated in this feed
- 1 Nov 2026, 10:26 UTC · Revision 1
Source evidence
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.
osv:UBUNTU-CVE-2019-25211
golang-github-gin-contrib-cors
Fixed versions: Not specified
golang-github-gin-contrib-cors
Fixed versions: Not specified
golang-github-gin-contrib-cors
Fixed versions: Not specified
golang-github-gin-contrib-cors
Fixed versions: Not specified
Complete source record
{
"id": "b772ad33d06d0324d8116adcfb02155811d99b0eac7917a4d7363711156ed216",
"url": "https://osv.dev/vulnerability/UBUNTU-CVE-2019-25211",
"method": "structured",
"payload": {
"kind": "advisory",
"title": "UBUNTU-CVE-2019-25211",
"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.",
"evidence": "osv:UBUNTU-CVE-2019-25211",
"products": [
{
"name": {
"value": "golang-github-gin-contrib-cors",
"evidence": "/affected/0/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.3.0-2",
"evidence": "/affected/0/versions"
}
]
},
{
"name": {
"value": "golang-github-gin-contrib-cors",
"evidence": "/affected/1/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.3.1-1",
"evidence": "/affected/1/versions"
}
]
},
{
"name": {
"value": "golang-github-gin-contrib-cors",
"evidence": "/affected/2/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.4.0-1",
"evidence": "/affected/2/versions"
}
]
},
{
"name": {
"value": "golang-github-gin-contrib-cors",
"evidence": "/affected/3/package/name"
},
"prerequisites": [],
"fixed_versions": [],
"affected_versions": [
{
"value": "1.4.0-1",
"evidence": "/affected/3/versions"
}
]
}
],
"severity": "critical",
"structured": {
"id": "UBUNTU-CVE-2019-25211",
"aliases": [
"UBUNTU-CVE-2019-25211"
],
"metrics": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"
},
{
"type": "Ubuntu",
"score": "medium"
}
],
"affected": [
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "golang-github-gin-contrib-cors",
"purl": "pkg:deb/ubuntu/golang-github-gin-contrib-cors?arch=source&distro=focal",
"ecosystem": "Ubuntu:20.04:LTS"
},
"versions": [
"1.3.0-2"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2019/UBUNTU-CVE-2019-25211.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "golang-github-gin-contrib-cors-dev",
"binary_version": "1.3.0-2"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "golang-github-gin-contrib-cors",
"purl": "pkg:deb/ubuntu/golang-github-gin-contrib-cors?arch=source&distro=jammy",
"ecosystem": "Ubuntu:22.04:LTS"
},
"versions": [
"1.3.1-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2019/UBUNTU-CVE-2019-25211.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "golang-github-gin-contrib-cors-dev",
"binary_version": "1.3.1-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "golang-github-gin-contrib-cors",
"purl": "pkg:deb/ubuntu/golang-github-gin-contrib-cors?arch=source&distro=noble",
"ecosystem": "Ubuntu:24.04:LTS"
},
"versions": [
"1.4.0-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2019/UBUNTU-CVE-2019-25211.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "golang-github-gin-contrib-cors-dev",
"binary_version": "1.4.0-1"
}
]
}
},
{
"ranges": [
{
"type": "ECOSYSTEM",
"events": [
{
"introduced": "0"
}
]
}
],
"package": {
"name": "golang-github-gin-contrib-cors",
"purl": "pkg:deb/ubuntu/golang-github-gin-contrib-cors?arch=source&distro=questing",
"ecosystem": "Ubuntu:25.10"
},
"versions": [
"1.4.0-1"
],
"database_specific": {
"source": "https://github.com/canonical/ubuntu-security-notices/blob/main/osv/cve/2019/UBUNTU-CVE-2019-25211.json"
},
"ecosystem_specific": {
"binaries": [
{
"binary_name": "golang-github-gin-contrib-cors-dev",
"binary_version": "1.4.0-1"
}
]
}
}
],
"modified": "2026-10-25T23:30:02.980056567Z",
"provider": "osv",
"upstream": [
"CVE-2019-25211"
],
"references": [
"https://ubuntu.com/security/CVE-2019-25211",
"https://www.cve.org/CVERecord?id=CVE-2019-25211",
"https://github.com/gin-contrib/cors/pull/57",
"https://github.com/gin-contrib/cors/pull/106",
"https://github.com/gin-contrib/cors/compare/v1.5.0...v1.6.0",
"https://github.com/gin-contrib/cors/releases/tag/v1.6.0",
"https://github.com/gin-contrib/cors/commit/27b723a473efd80d5a498fa9f5933c80204c850d"
]
},
"related_cves": [
{
"value": "CVE-2019-25211",
"evidence": "/upstream"
}
],
"security_relevant": true,
"severity_evidence": "/severity/0/score"
},
"source_id": "core-osv",
"document_id": 446227,
"published_at": "2024-06-29T00:15:00+00:00"
}