{"id":"GHSA-869c-j7wc-8jqv","summary":"Gin mishandles a wildcard at the end of an origin string","details":"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.","aliases":["CVE-2019-25211","GO-2024-2955"],"modified":"2025-11-03T22:47:01Z","published":"2024-06-29T06:31:40Z","database_specific":{"severity":"CRITICAL","github_reviewed":true,"github_reviewed_at":"2024-07-01T21:30:24Z","nvd_published_at":"2024-06-29T00:15:02Z","cwe_ids":["CWE-346"]},"references":[{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2019-25211"},{"type":"WEB","url":"https://github.com/gin-contrib/cors/pull/106"},{"type":"WEB","url":"https://github.com/gin-contrib/cors/pull/57"},{"type":"WEB","url":"https://github.com/gin-contrib/cors/commit/27b723a473efd80d5a498fa9f5933c80204c850d"},{"type":"WEB","url":"https://github.com/gin-contrib/cors/compare/v1.5.0...v1.6.0"},{"type":"WEB","url":"https://github.com/gin-contrib/cors/releases/tag/v1.6.0"},{"type":"PACKAGE","url":"https://github.com/gin-gonic/gin"},{"type":"WEB","url":"https://lists.debian.org/debian-lts-announce/2025/08/msg00024.html"}],"affected":[{"package":{"name":"github.com/gin-gonic/gin","ecosystem":"Go","purl":"pkg:golang/github.com/gin-gonic/gin"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.6.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/06/GHSA-869c-j7wc-8jqv/GHSA-869c-j7wc-8jqv.json"}},{"package":{"name":"github.com/gin-contrib/cors","ecosystem":"Go","purl":"pkg:golang/github.com/gin-contrib/cors"},"ranges":[{"type":"SEMVER","events":[{"introduced":"0"},{"fixed":"1.6.0"}]}],"database_specific":{"source":"https://github.com/github/advisory-database/blob/main/advisories/github-reviewed/2024/06/GHSA-869c-j7wc-8jqv/GHSA-869c-j7wc-8jqv.json"}}],"schema_version":"1.9.0","severity":[{"type":"CVSS_V3","score":"CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N"},{"type":"CVSS_V4","score":"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"}]}