Skip to main content
← All vulnerabilities
CVE-2025-24358GO-2025-3607GHSA-RQ77-P4H8-4CRW

gorilla/csrf CSRF vulnerability due to broken Referer validation

Published
Last modified
published
Not listed in CISA KEV
Fix
Fixed in 1.7.3
None on Exploit-DB, Metasploit or GitHub
  • Exploitation: poc
  • Automatable: no
  • Technical impact: partial

Summary

gorilla/csrf provides Cross Site Request Forgery (CSRF) prevention middleware for Go web applications & services. Prior to 1.7.2, gorilla/csrf does not validate the Origin header against an allowlist. Its executes its validation of the Referer header for cross-origin requests only when it believes the request is being served over TLS. It determines this by inspecting the r.URL.Scheme value. However, this value is never populated for "server" requests per the Go spec, and so this check does not run in practice. This vulnerability allows an attacker who has gained XSS on a subdomain or top level domain to perform authenticated form submissions against gorilla/csrf protected targets that share the same top level domain. This vulnerability is fixed in 1.7.2.

Timeline

  1. CVE published
  2. CISA SSVC assessment

    Exploitation: poc · Automatable: no · Technical impact: partial

  3. Record last updated

Affected versions

  • gorilla csrf

    fixed in 1.7.3

  • github.com/gorilla/csrfGo

    fixed in 1.7.3

References 2

GitHub · gorilla/csrf