Cross-site Request Forgery (CSRF) Affecting github.com/gorilla/csrf package, versions >=0.0.0


Severity

Recommended
0.0
high
0
10

CVSS assessment by Snyk's Security Team. Learn more

Threat Intelligence

EPSS
0.04% (10th 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-GOLANG-GITHUBCOMGORILLACSRF-12297784
  • published31 Aug 2025
  • disclosed29 Aug 2025
  • creditFilippo Valsorda

Introduced: 29 Aug 2025

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

How to fix?

There is no fixed version for github.com/gorilla/csrf.

Overview

Affected versions of this package are vulnerable to Cross-site Request Forgery (CSRF) due to improper validation of the TrustedOrigins header which was introduced by the fix for CVE-2025-24358. An attacker can perform unauthorized actions on behalf of authenticated users by submitting cross-origin requests from an allowed origin, exploiting the fact that both HTTP and HTTPS origins are permitted when only the host is checked.

Note: Applications should migrate to net/http.CrossOriginProtection, which was introduced in Go 1.25. If that's not feasible, a backport module is available at filippo.io/csrf. A drop-in replacement for the github.com/gorilla/csrf API can also be found at filippo.io/csrf/gorilla.

CVSS Base Scores

version 4.0
version 3.1