PT-2024-10742 · Unknown+1 · Gin-Gonic Cors Middleware+1
Govulnbot
·
Published
2024-06-28
·
Updated
2025-09-03
·
CVE-2019-25211
CVSS v4.0
9.3
Critical
| Vector | AV:N/AC:L/AT:N/PR:N/UI:N/VC:H/VI:H/VA:N/SC:N/SI:N/SA:N |
Name of the Vulnerable Software and Affected Versions
Gin-Gonic CORS middleware versions prior to 1.6.0
Description
The issue arises from the mishandling of a wildcard at the end of an origin string by the
parseWildcardRules function in Gin-Gonic CORS middleware. This results in unintended origins being allowed. For example, https://example.community/* is allowed when the intention is to only allow https://example.com/*, and http://localhost.example.com/* is allowed when the intention is to only allow http://localhost/*.Recommendations
For versions prior to 1.6.0, update to version 1.6.0 or later to resolve the issue. As a temporary workaround, consider manually validating origin strings to ensure they match the intended patterns, avoiding the use of wildcards at the end of origin strings until a patch is applied.
Fix
Origin Validation Error
Found an issue in the description? Have something to add? Feel free to write us 👾
Weakness Enumeration
Related Identifiers
Affected Products
Debian
Gin-Gonic Cors Middleware