CVE-2025-24358
published medium CVSS 4.0 · 5.4gorilla/csrf CSRF vulnerability due to broken Referer validation
Package status and fixes
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| gorilla | — | csrf< 1.7.3 | Affected | Not stated | GitHub_M |
| Debian | bullseye | golang-github-gorilla-csrf | Advisory build | 1.6.2-2+deb11u1 | DLA-4151-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | govulncheck-vulndbaarch64 | Advisory build | 0.0.20250422T181640-1.1 | OPENSUSE-SU-2025:15017-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | govulncheck-vulndbppc64le | Advisory build | 0.0.20250422T181640-1.1 | OPENSUSE-SU-2025:15017-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | govulncheck-vulndbs390x | Advisory build | 0.0.20250422T181640-1.1 | OPENSUSE-SU-2025:15017-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | govulncheck-vulndbx86_64 | Advisory build | 0.0.20250422T181640-1.1 | OPENSUSE-SU-2025:15017-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | velociraptoraarch64 | Advisory build | 0.7.0.4.git185.a5708584-2.1 | OPENSUSE-SU-2026:11126-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | velociraptorppc64le | Advisory build | 0.7.0.4.git185.a5708584-2.1 | OPENSUSE-SU-2026:11126-1 |
Show 2 more entries
| Distro / vendor | Release | Package / product | Publisher status | Fixed build | Source |
|---|---|---|---|---|---|
| SUSE / openSUSE | openSUSE-Tumbleweed | velociraptors390x | Advisory build | 0.7.0.4.git185.a5708584-2.1 | OPENSUSE-SU-2026:11126-1 |
| SUSE / openSUSE | openSUSE-Tumbleweed | velociraptorx86_64 | Advisory build | 0.7.0.4.git185.a5708584-2.1 | OPENSUSE-SU-2026:11126-1 |
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.
Related advisories
Vendor advisories explicitly linked to this CVE.
Assessment
CVSS risk assessment and additional context for this vulnerability.
- CVSS version
- 4.0
- Base score
- 5.4 / 10
- Severity
- medium
- Provider
- GitHub_M · cna
- Vector string
- CVSS:4.0/AV:N/AC:L/AT:P/PR:N/UI:P/VC:N/VI:H/VA:N/SC:N/SI:N/SA:N/E:P
Publisher product statements
Version ranges and default statuses as reported by each provider.
| Vendor | Product | Version status | Source |
|---|---|---|---|
| gorilla | csrf | < 1.7.3 (affected) | GitHub_M · cna |
Weaknesses
1- CWE-352 CWE-352: Cross-Site Request Forgery (CSRF)
References
3Provider assertions
3GitHub_M · cna
gorilla/csrf CSRF vulnerability due to broken Referer validation
CISA-ADP · adp
CISA ADP Vulnrichment
CVE · adp
CVE Program Container
Provenance
- Schema
- 5.1
- Searchable
- yes
- Content hash
- 88e0e4baa2d4c45a676be8585939cdf67e5e467c5bb555d51cc5c960df1aeb26
- Ingested
- 23 Sep 2026, 08:41:20 UTC
- Source record
- Official CVE record