Live threats

All CVEs / gin-contrib

CVE-2019-25211gin-contrib cors

Critical 9.1 No auth needed

Priority
70
CVSS 3.1
9.1
EPSS
0.4%
probability of exploitation in 30 days · percentile 39
Auth required
No
Published
Jun 29, 2024
Updated
Jun 17, 2026
Category
Application · Cross-platform
Weakness (CWE)
CWE-346
SSVC (CISA)
Exploitation: none · Automatable: yes · Technical impact: total
Vector
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

What happens

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.

Original NVD text.

What to do

  1. Apply the vendor's security update for cors.
  2. It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.

Affected packages

EcosystemPackageAffected versionsFixed inHow to upgrade
Go github.com/gin-contrib/cors < 1.6.0 1.6.0 go get github.com/gin-contrib/cors@v1.6.0
Go github.com/gin-contrib/cors < 1.6.0 1.6.0 go get github.com/gin-contrib/cors@v1.6.0
Go github.com/gin-gonic/gin < 1.6.0 1.6.0 go get github.com/gin-gonic/gin@v1.6.0

Per OSV / GitHub Advisories (GHSA-869c-j7wc-8jqv, GO-2024-2955). Check the version in your lockfile before upgrading.

Affected products

As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.

Official sources

References

Links published by the sources. Open them with care.