CVE-2025-24358
CVE-2025-24358 · gorilla/csrf CSRF vulnerability due to broken Referer validation
CVSS 5.4 · Medium · EPSS 0.4% · Fix available
Compare with your installed version
Affected products and known fixed versions are public information. Compare them with your installed version.
- csrfNo fix published
- golang-github-gorilla-csrf Debian 12No fix published
- golang-github-gorilla-csrf Debian 13Update to 1.7.2+ds1-2
- golang-github-gorilla-csrf Debian 14Update to 1.7.2+ds1-2
- and 6 more
Check the installed version:
dpkg-query -W -f='${source:Package} ${binary:Package} ${Version}\n' | awk '$1=="golang-github-gorilla-csrf"'Assess your server’s risks
The free check gives you a rating and a risk summary by technology stack, without signing up. It does not answer whether this particular vulnerability affects you.
Monitoring matches public information against your servers’ software. Detailed findings for your servers include the order of updates.
curl -fsSL https://patchfirst.dev/check.sh | shChannels carry general technology news; monitoring reports new findings on your servers in your dashboard, through browser notifications, in Telegram or via a webhook.
This page contains facts from public vulnerability sources. Check the original advisory before updating.
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.
- Published
- Updated
Fixes in distributions
- openSUSE-SU-2026:11126-1 · openSUSE Tumbleweed ·
- DLA-4151-1 · Debian 11 ·
- openSUSE-SU-2025:15017-1 · openSUSE Tumbleweed ·
Stack: system
Affected products and versions
csrf
- Versions
- < 1.7.3: Affected
No fix published
golang-github-gorilla-csrf Debian 12
- Versions
- 1.7.1-1
- 1.7.2+ds1-1
- 1.7.2+ds1-2
- 1.7.2+ds1-3
- 1.7.2-1
- 1.7.2-1~bpo12+1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
golang-github-gorilla-csrf Debian 13
- Affected ranges
- ECOSYSTEM: < 1.7.2+ds1-2
Update to 1.7.2+ds1-2
golang-github-gorilla-csrf Debian 14
- Affected ranges
- ECOSYSTEM: < 1.7.2+ds1-2
Update to 1.7.2+ds1-2
golang-github-gorilla-csrf Ubuntu 20.04 LTS
- Versions
- 1.6.2-1
- 1.6.2-2
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
golang-github-gorilla-csrf Ubuntu 22.04 LTS
- Versions
- 1.6.2-2
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
golang-github-gorilla-csrf Ubuntu 24.04 LTS
- Versions
- 1.7.1-1
- 1.7.2-1
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
golang-github-gorilla-csrf Ubuntu 25.10
- Versions
- 1.7.2+ds1-1
- 1.7.2+ds1-2
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
golang-github-gorilla-csrf Ubuntu 26.10
- Versions
- 1.7.2+ds1-2
- 1.7.2+ds1-3
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published
golang-github-gorilla-csrf Ubuntu 26.04 LTS
- Versions
- 1.7.2+ds1-2
- Affected ranges
- ECOSYSTEM: (−∞, +∞)
No fix published