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
| Vendor | Product | Affected | Fixed |
|---|---|---|---|
| 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.
Debian
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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 |
Ubuntu
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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)Fewer releases
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Ubuntu 20.04 LTS | golang-github-gorilla-csrf | No fix yet | — |
openSUSE
Security tracker ↗| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| 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
| Release | Package | Fixed in | Advisory |
|---|---|---|---|
| Wolfi rolling | harbor-2.14 +6 | 2.14.0-r1 | — |
| Wolfi rolling | tailscale +1 | 1.82.0-r42 | — |
Affected packages
| Ecosystem | Package | Affected | Fixed | Record |
|---|---|---|---|---|
| Go | github.com/gorilla/csrf | < 1.7.3 | 1.7.3 | GHSA-rq77-p4h8-4crw |
Advisories 3
- openSUSE-SU-2026:11126-1 velociraptor-0.7.0.4.git185.a5708584-2.1 on GA media SUSE / openSUSE Security Updates · Jun 26, 2026
- DLA-4151-1 golang-github-gorilla-csrf - security update Debian Security (DSA / DLA) · Mar 9, 2026
- openSUSE-SU-2025:15017-1 govulncheck-vulndb-0.0.20250422T181640-1.1 on GA media SUSE / openSUSE Security Updates · Feb 4, 2026