Skip to content
OpenAdvisories

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.

Affected products

VendorProductAffectedFixed
gorilla csrf < 1.7.3 —

Fixed in Linux distributions

Distributions backport fixes, so the version that fixes this vulnerability differs per release — upgrade to at least the version shown. From the distributions' security trackers and advisories.

ReleasePackageFixed inAdvisory
Debian 14 golang-github-gorilla-csrf 1.7.2+ds1-2 —
Debian 13 golang-github-gorilla-csrf 1.7.2+ds1-2 —
Debian 12 golang-github-gorilla-csrf No fix yet —
Debian 11 golang-github-gorilla-csrf 1.6.2-2+deb11u1 DLA-4151-1
ReleasePackageFixed inAdvisory
Ubuntu 26.10 golang-github-gorilla-csrf No fix yet —
Ubuntu 26.04 LTS golang-github-gorilla-csrf No fix yet —
Ubuntu 25.10 golang-github-gorilla-csrf No fix yet —
Ubuntu 24.04 LTS golang-github-gorilla-csrf No fix yet —
Ubuntu 22.04 LTS golang-github-gorilla-csrf No fix yet —
Show 1 more (older releases, extended support, other products)
ReleasePackageFixed inAdvisory
Ubuntu 20.04 LTS golang-github-gorilla-csrf No fix yet —
ReleasePackageFixed inAdvisory
openSUSE Tumbleweed govulncheck-vulndb 0.0.20250422T181640-1.1 openSUSE-SU-2025:15017-1
openSUSE Tumbleweed velociraptor 0.7.0.4.git185.a5708584-2.1 openSUSE-SU-2026:11126-1

Wolfi

ReleasePackageFixed inAdvisory
Wolfi rolling harbor-2.14 +6 2.14.0-r1 —
Wolfi rolling tailscale +1 1.82.0-r42 —

Affected packages

EcosystemPackageAffectedFixedRecord
Go github.com/gorilla/csrf < 1.7.3 1.7.3 GHSA-rq77-p4h8-4crw

Advisories 3

References