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

VectorAV: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

Weakness Enumeration

Related Identifiers

CVE-2019-25211
DLA-4285-1
GHSA-869C-J7WC-8JQV
GO-2024-2955

Affected Products

Debian
Gin-Gonic Cors Middleware