Skip to content

Gin mishandles a wildcard at the end of an origin string

Critical severity GitHub Reviewed Published Jun 29, 2024 to the GitHub Advisory Database • Updated Aug 2, 2024

Package

gomod github.com/gin-contrib/cors (Go)

Affected versions

< 1.6.0

Patched versions

1.6.0
gomod github.com/gin-gonic/gin (Go)
< 1.6.0
1.6.0

Description

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.

References

Published by the National Vulnerability Database Jun 29, 2024
Published to the GitHub Advisory Database Jun 29, 2024
Reviewed Jul 1, 2024
Last updated Aug 2, 2024

Severity

Critical
9.1
/ 10

CVSS base metrics

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

Weaknesses

No CWEs

CVE ID

CVE-2019-25211

GHSA ID

GHSA-869c-j7wc-8jqv

Source code

Loading Checking history
See something to contribute? Suggest improvements for this vulnerability.