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.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| 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
- USN-8983-1 golang-github-gin-contrib-cors vulnerability Ubuntu Security Notices (USN) · Nov 4, 2026
- DLA-4285-1 golang-github-gin-contrib-cors - security update Debian Security (DSA / DLA) · Mar 9, 2026