CVE-2019-25211: Critical severity go/github.com/gin-contrib/cors vulnerability

Published Jun 28, 2024
·
Updated

Gin-Gonic CORS middleware mishandles a wildcard at the end of an origin string. Examples: https://example.community/ is accepted by the origin string https://example.com/ and http://localhost.example.com/ is accepted by the origin string http://localhost/ .

Other sources

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.

— NVD

Affected Software

6 affected componentsFixes available
go/github.com/gin-contrib/cors<1.6.0
1.6.0
go/github.com/gin-gonic/gin<1.6.0
1.6.0
ubuntu/golang-github-gin-contrib-cors*
ubuntu/golang-github-gin-contrib-cors*
ubuntu/golang-github-gin-contrib-cors*
ubuntu/golang-github-gin-contrib-cors*

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade go/github.com/gin-contrib/cors to a version that resolves this vulnerability.

    Fixed in 1.6.0
  2. Upgrade

    Upgrade go/github.com/gin-gonic/gin to a version that resolves this vulnerability.

    Fixed in 1.6.0
  3. Upgrade

    Upgrade ubuntu/golang-github-gin-contrib-cors to a version that resolves this vulnerability.

    Fixed in 1.3.0-2ubuntu0.1~esm1
  4. Upgrade

    Upgrade ubuntu/golang-github-gin-contrib-cors to a version that resolves this vulnerability.

    Fixed in 1.3.1-1+deb11u1build0.22.04.1
  5. Upgrade

    Upgrade ubuntu/golang-github-gin-contrib-cors to a version that resolves this vulnerability.

    Fixed in 1.4.0-1ubuntu0.1~esm1

Event History

Jun 28, 2024
CVE Published
via MITRE·12:00 AM
Data Sourced
via MITRE·12:00 AM
Description
Jun 29, 2024
Data Sourced
via OSV·12:15 AM
DescriptionSeverityAffected Software
Data Sourced
via NVD·12:15 AM
DescriptionSeverityWeakness
Advisory Published
via GitHub·06:31 AM
Jul 2, 2024
Data Sourced
via Red Hat·09:00 PM
DescriptionSeverityAffected Software

Frequently Asked Questions

1

What is the severity of CVE-2019-25211?

CVE-2019-25211 has a medium severity rating that could allow unauthorized access through improper CORS validation.

2

How do I fix CVE-2019-25211?

To fix CVE-2019-25211, update to the Gin-Gonic CORS middleware version 1.6.0 or later.

3

Which software is affected by CVE-2019-25211?

CVE-2019-25211 affects the Gin-Gonic CORS middleware in versions prior to 1.6.0.

4

What is the nature of the vulnerability in CVE-2019-25211?

CVE-2019-25211 is a cross-origin resource sharing issue that mishandles wildcards in the origin string.

5

Can CVE-2019-25211 lead to security breaches?

Yes, CVE-2019-25211 can lead to security breaches by allowing unauthorized access to resources.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203