Highlights
Auth Bypass: 2 prior fixes. Scrutinize any change in this area.
config.go: most-fixed (3 issues). Treat as high-risk during review.
3 high-severity fixes in this history; regressions here are high-impact.
Recurring patterns
The bug types that recur here, drawn from past fixes, not open vulnerabilities.
Auth Bypass: Off-by-one errors and inadequate validation in the wildcard domain parsing function allow unauthorized origins that contain suffix or subdomain variations to match intended rules, directly bypassing CORS access controls. This is publicly tracked under CVE-2019-25211.
CORS Bypass: Inspecting the 'Host' header via c.Request.Header.Get("Host") instead of the canonical c.Request.Host field causes same-origin detection mechanisms to fail because the Go net/http standard library strips the raw header. This allows spoofed same-origin requests to bypass restrictions.
CORS Misconfiguration: Conditional logic errors when constructing the CORS response headers (e.g., omitting the Access-Control-Allow-Origin header when credentials are false or mismanaging reflection when both allowAllOrigins and allowCredentials are set) lead to broken or insecure browser-side CORS policies.