CVE-2019-25211
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.
What to do
Fixed builds are available from Debian, Go, Ubuntu: see the table below for the fixed version per release.
Ubuntu has not shipped a fix for every release yet.
Is your server affected? One read-only command checks every installed package against this CVE and all others, using each vendor's fixed versions. Get started or get a free API key.
curl -sS "https://api.cvefocus.com/v1/check?format=text" -H "Authorization: Bearer $CVEFOCUS_KEY" \ -H "Content-Type: text/plain" --data-binary @inventory.txt
Vendor status at a glance
Status by vendor and release
From each vendor's own security data and VEX statements. "Fixed" means a fixed build is published for that release.
| Release | Package | Status | Fixed version | Advisory |
|---|---|---|---|---|
| Ubuntu 26.04 | golang-github-gin-contrib-cors | Not affected vulnerable_code_not_present | ||
| Ubuntu 25.10 | golang-github-gin-contrib-cors | Will not fix Ubuntu decided not to fix this in this release | UBUNTU-CVE-2019-25211 | |
| Ubuntu 24.04 | golang-github-gin-contrib-cors | Fix pending | 1.4.0-1ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2019-25211 |
| Ubuntu 22.04 | golang-github-gin-contrib-cors | Fixed | 1.3.1-1+deb11u1build0.22.04.1 | UBUNTU-CVE-2019-25211 |
| Ubuntu 20.04 | golang-github-gin-contrib-cors | Fix pending | 1.3.0-2ubuntu0.1~esm1 (Ubuntu Pro) | UBUNTU-CVE-2019-25211 |
| Debian 13 | golang-github-gin-contrib-cors | Fixed | 1.4.0-1+deb13u1 | DEBIAN-CVE-2019-25211 |
| Debian 12 | golang-github-gin-contrib-cors | Fixed | 1.4.0-1+deb12u1 | DEBIAN-CVE-2019-25211 |
| Go library | github.com/gin-contrib/cors | Fixed | 1.6.0 | GHSA-869c-j7wc-8jqv |
| Go library | github.com/gin-gonic/gin | Fixed | 1.6.0 | GHSA-869c-j7wc-8jqv |
References
- 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
About this page
Compiled by CVEfocus from the CVE List, the security data and VEX statements of Ubuntu, Debian, Red Hat, AlmaLinux, Rocky Linux and Microsoft, CISA's Known Exploited Vulnerabilities catalog and FIRST EPSS, refreshed several times a day (data status). Information only; see the disclaimer. Official record: cve.org · NVD.