Cross-site Request Forgery (CSRF) Affecting golang-github-gorilla-csrf package, versions *


Severity

Recommended
low

Based on default assessment until relevant scores are available.

Threat Intelligence

EPSS
0.03% (6th percentile)

Do your applications use this vulnerable package?

In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.

Test your applications

Snyk Learn

Learn about Cross-site Request Forgery (CSRF) vulnerabilities in an interactive lesson.

Start learning
  • Snyk IDSNYK-DEBIAN11-GOLANGGITHUBGORILLACSRF-9726217
  • published17 Apr 2025
  • disclosed15 Apr 2025

Introduced: 15 Apr 2025

NewCVE-2025-24358  (opens in a new tab)
CWE-352  (opens in a new tab)

How to fix?

There is no fixed version for Debian:11 golang-github-gorilla-csrf.

NVD Description

Note: Versions mentioned in the description apply only to the upstream golang-github-gorilla-csrf package and not the golang-github-gorilla-csrf package as distributed by Debian. See How to fix? for Debian:11 relevant fixed versions and status.

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.