Skip to content

Gin mishandles a wildcard at the end of an origin string

Moderate severity GitHub Reviewed Published Jun 29, 2024 to the GitHub Advisory Database • Updated Jul 1, 2024

Package

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

Affected versions

< 1.6.0

Patched versions

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 Jul 1, 2024

Severity

Moderate

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.