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.
Metrics
Affected Vendors & Products
References
History
Thu, 01 May 2025 11:45:00 +0000
Type | Values Removed | Values Added |
---|---|---|
References |
|
Tue, 15 Apr 2025 20:15:00 +0000
Type | Values Removed | Values Added |
---|---|---|
Metrics |
ssvc
|
Tue, 15 Apr 2025 19:00:00 +0000
Type | Values Removed | Values Added |
---|---|---|
Description | 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. | |
Title | gorilla/csrf CSRF vulnerability due to broken Referer validation | |
Weaknesses | CWE-352 | |
References |
| |
Metrics |
cvssV4_0
|

Status: PUBLISHED
Assigner: GitHub_M
Published: 2025-04-15T18:57:40.559Z
Updated: 2025-05-01T11:02:45.986Z
Reserved: 2025-01-20T15:18:26.989Z
Link: CVE-2025-24358

Updated: 2025-05-01T11:02:45.986Z

Status : Awaiting Analysis
Published: 2025-04-15T19:16:07.193
Modified: 2025-05-01T11:15:53.613
Link: CVE-2025-24358

No data.