Skip to content
Fencer Intel
critical 9.1

CVE-2019-25211 json

Gin mishandles a wildcard at the end of an origin string

published 2y ago modified 4mo ago also GHSA-869c-j7wc-8jqv , GO-2024-2955 , EUVD-2024-1974

cvss
9.1
version 3.1, CNA
cisa kev
Not listed
not in CISA's catalog
epss
0.4%
EPSS 0.4% chance of exploitation in 30 days, percentile 37%
public exploits
0
none known

Summary

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.

Patch / fix

  • go github.com/gin-gonic/gin 1.6.0
  • go github.com/gin-contrib/cors 1.6.0
  • gin-contrib cors 1.6.0
  • golang-github-gin-contrib-cors Debian 12 1.4.0-1+deb12u1
  • golang-github-gin-contrib-cors Debian 13 1.4.0-1+deb13u1

debian advisories DEBIAN-CVE-2019-25211

  • golang-github-gin-contrib-cors Ubuntu 22.04 LTS 1.3.1-1+deb11u1build0.22.04.1
  • golang-github-gin-contrib-cors Ubuntu Pro 20.04 LTS 1.3.0-2ubuntu0.1~esm1
  • golang-github-gin-contrib-cors Ubuntu Pro 24.04 LTS 1.4.0-1ubuntu0.1~esm1

ubuntu advisories UBUNTU-CVE-2019-25211

Ubuntu security data © Canonical Ltd., from https://github.com/canonical/ubuntu-security-notices via OSV; changed: normalised to fixed package versions per release. CC BY-SA 4.0

Is CVE-2019-25211 in your dependencies? Fencer shows which of your repositories are affected as soon as an advisory lands, and opens the fix as a pull request.

Check with Fencer

Vendor advisories

What the vendors themselves say about their products: affected, fixed or not affected, and what to do.

red hat product security vex CVE-2019-25211 updated cvss 6.5

github.com/gin-contrib/cors: Gin mishandles a wildcard in the origin string in github.com/gin-contrib/cors

  • Red Hat Migration Toolkit for Virtualization migration-toolkit-virtualization/mtv-api-rhel9, migration-toolkit-virtualization/mtv-rhel8-operator, migration-toolkit-virtualization/mtv-virt-v2v-rhel9, migration-toolkit-virtualization/mtv-controller-rhel9, migration-toolkit-virtualization/mtv-validation-rhel9, migration-toolkit-virtualization/mtv-rhv-populator-rhel8, +4 more
    affected: workaround, no fix available “Fix deferred”
  • Red Hat Migration Toolkit 1.8 rhmtc/openshift-migration-controller-rhel8 v1.8.4-22
    fixed: vendor fix RHSA-2024:7164
  • Red Hat Migration Toolkit 1.8 rhmtc/openshift-migration-ui-rhel8 v1.8.4-10, rhmtc/openshift-migration-openvpn-rhel8 v1.8.4-10, rhmtc/openshift-migration-registry-rhel8 v1.8.4-11, rhmtc/openshift-migration-rhel8-operator v1.8.4-16, rhmtc/openshift-migration-operator-bundle v1.8.4-33, rhmtc/openshift-migration-hook-runner-rhel8 v1.8.4-8, +4 more
    not affected: vulnerable code not present

Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf

CISA SSVC

Exploitation
none
Automatable
yes
Technical impact
total
Assessed
2y ago

Exploit prediction

0.43% chance of exploitation in the next 30 days, higher than 37% of all scored CVEs (FIRST EPSS, 2026-11-09).

CVSS scores

assigned by version score vector
CISA ADP 3.1 9.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
CNA 3.1 9.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
GitHub 3.1 9.1 CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Affected packages

ecosystem package affected fixed in
go github.com/gin-gonic/gin
<1.6.0
1.6.0
go github.com/gin-contrib/cors
<1.6.0
1.6.0

Affected products

  • gin-contrib cors

Classification

Weakness

References

Sources

Fencer Intel keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.