Skip to content
OpenAdvisories
Critical · 9.1 CVE-2019-25211 EUVD-2024-1974GHSA-869c-j7wc-8jqvGO-2024-2955

Gin mishandles a wildcard at the end of an origin string

Published Jun 28, 2024 · Updated Nov 3, 2025 · Assigned by mitre

Description

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.

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 13 golang-github-gin-contrib-cors 1.4.0-1+deb13u1 —
Debian 12 golang-github-gin-contrib-cors 1.4.0-1+deb12u1 —
Debian 11 golang-github-gin-contrib-cors 1.3.1-1+deb11u1 DLA-4285-1
ReleasePackageFixed inAdvisory
Ubuntu 25.10 golang-github-gin-contrib-cors No fix yet —
Ubuntu 22.04 LTS golang-github-gin-contrib-cors 1.3.1-1+deb11u1build0.22.04.1 USN-8983-1
Show 2 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu Pro 24.04 LTS golang-github-gin-contrib-cors 1.4.0-1ubuntu0.1~esm1 USN-8983-1
Ubuntu Pro 20.04 LTS golang-github-gin-contrib-cors 1.3.0-2ubuntu0.1~esm1 USN-8983-1

Affected packages

EcosystemPackageAffectedFixedRecord
Go github.com/gin-contrib/cors < 1.6.0 1.6.0 GHSA-869c-j7wc-8jqv
Go github.com/gin-gonic/gin < 1.6.0 1.6.0 GHSA-869c-j7wc-8jqv

Advisories 2

References