Skip to main content

CVE-2019-25211 — Vulnerability in github.com/gin-gonic/gin

CRITICAL

Gin mishandles a wildcard at the end of an origin string

Published June 29, 2024Updated November 3, 2025Source: OSV

What Should I Do?

Address in Next Maintenance Window

Low exploitation probability (0.43%). Schedule for your next planned update.

Does your project use an affected github.com/gin-gonic/gin version?

Paste your go.sum to check it for CVE-2019-25211 and every other known vulnerability, with CISA KEV and EPSS on each finding. Free with no signup for up to 10 packages, or up to 500 per scan with a free account, which also keeps up to 200 packages in saved projects.

Check my go.sum

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.

Advisory Timeline

  • First published June 29, 2024 (880 days ago).
  • Last revised November 3, 2025 — 493 days after initial publication.

Remediation

Upgrade to the fixed version using your package manager.

Go
Update github.com/gin-gonic/gin to 1.6.0 or later
go get github.com/gin-gonic/gin@v1.6.0
Go
Update github.com/gin-contrib/cors to 1.6.0 or later
go get github.com/gin-contrib/cors@v1.6.0

After upgrading, scan your dependencies again to confirm the vulnerability is resolved.

Affected Packages (2)

Affects 1 ecosystem: Go (2).

PackageFixed In
github.com/gin-gonic/gin Go · Affected: All versions1.6.0
github.com/gin-contrib/cors Go · Affected: All versions1.6.0

Vulnerability Classification

Common Weakness Enumeration (CWE) identifiers for this vulnerability type.

  • CWE-346
    Origin Validation ErrorMITRE

CVSS Score Breakdown

What the CVSS (Common Vulnerability Scoring System) 9.1 score means for each attack dimension.

Attack Vector
Network
Attack Complexity
Low
Privileges Required
None
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
None

CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N

Frequently Asked Questions

What is CVE-2019-25211?
Gin mishandles a wildcard at the end of an origin string. This vulnerability has been assigned a severity rating of CRITICAL (CVSS score: 9.1/10).
How do I check if my project is affected by CVE-2019-25211?
CVE-2019-25211 affects github.com/gin-gonic/gin and github.com/gin-contrib/cors. It has a 0.4% probability of exploitation within 30 days (EPSS score). Use GeekWala's free vulnerability scanner to check your dependencies against CVE-2019-25211 and 200,000+ other known vulnerabilities.

Severity & Exploitability

CVSS Score
9.1

Maximum impact if exploited, often with little effort or access required.

EPSS Score (30-day exploit probability)
0.43%
EPSS percentile: 29.2

This is a below-median EPSS score — only 29.2% of tracked vulnerabilities score at or below it, so most tracked vulnerabilities are considered more likely to be exploited than this one.

Also Known As

GHSA-869c-j7wc-8jqv
GO-2024-2955

Related CVEs

  • CVE-2026-104099
    CRITICAL

    Fabio: Access-control bypass through unnormalized request paths

  • CVE-2026-77369
    CRITICAL

    Daptin: Broken Access Control (IDOR) in the generic YJS collaboration endpoint

  • CVE-2020-28483
    HIGH

    Inconsistent Interpretation of HTTP Requests in github.com/gin-gonic/gin

  • CVE-2023-29401
    MEDIUM

    Gin Web Framework does not properly sanitize filename parameter of Context.FileAttachment function

  • CVE-2023-26125
    MEDIUM

    Improper input validation in github.com/gin-gonic/gin

  • CVE-2020-28483

    Inconsistent interpretation of HTTP Requests in github.com/gin-gonic/gin

  • CVE-2023-29401

    Improper handling of filenames in Content-Disposition HTTP header in github.com/gin-gonic/gin

Check your own dependencies

Free, with no signup for up to 10 packages.

Check my go.sum