CVE-2025-24358 json
gorilla/csrf CSRF vulnerability due to broken Referer validation
published 2025-04-14 18 mo ago modified 2026-09-10 1 mo ago also GHSA-rq77-p4h8-4crw , GO-2025-3607 , EUVD-2025-10883
- cvss
- 5.4
- version 4.0, CNA
- cisa kev
- Not listed
- not in CISA's catalog
- epss
- 0.4%
- EPSS 0.4% chance of exploitation in 30 days, percentile 32%
- public exploits
- 0
- none known
Summary
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.
Patch / fix
- go github.com/gorilla/csrf 1.7.3
- golang-github-gorilla-csrf Debian 14, Debian 13 1.7.2+ds1-2
debian advisories DEBIAN-CVE-2025-24358
- velociraptor openSUSE Tumbleweed 0.7.0.4.git185.a5708584-2.1
- govulncheck-vulndb openSUSE Tumbleweed 0.0.20250422T181640-1.1
opensuse advisories openSUSE-SU-2026:11126-1openSUSE-SU-2025:15017-1
Vendor advisories
What the vendors themselves say about their products: affected, fixed or not affected, and what to do.
red hat product security vex CVE-2025-24358 updated cvss 6.5
gorilla/csrf: gorilla/csrf CSRF vulnerability due to broken Referer validation
-
Red Hat All currently supported Red Hat productsnot affected: vulnerable code not present
Red Hat CSAF VEX © Red Hat, Inc., from https://security.access.redhat.com/data/csaf/v2/vex/; changed: reduced to product statuses and remediations. CC BY 4.0 · csaf
CISA SSVC
- Exploitation
- Proof of concept is public
- Automatable
- no
- Technical impact
- partial
- Assessed
- 18 mo ago
Exploit prediction
0.38% chance of exploitation in the next 30 days, higher than 32% of all scored CVEs (FIRST EPSS, 2026-11-08).
CVSS scores
| assigned by | version | score | vector |
|---|---|---|---|
| CNA | 4.0 | 5.4 | 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 |
| CNA | 4.0 | 5.4 | 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/CR:X/IR:X/AR:X/MAV:X/MAC:X/MAT:X/MPR:X/MUI:X/MVC:X/MVI:X/MVA:X/MSC:X/MSI:X/MSA:X/S:X/AU:X/R:X/V:X/RE:X/U:X |
Affected packages
| ecosystem | package | affected | fixed in |
|---|---|---|---|
| go | github.com/gorilla/csrf | <1.7.3 |
1.7.3 |
Affected products
- gorilla csrf
Classification
- Weakness
-
- CWE-352 Cross-Site Request Forgery
References
-
github.com
/gorilla/csrf/commit/9dd6af1f6d30fc79fb0d972394deebdabad6b5eb
web, patch
-
github.com
/gorilla/csrf/security/advisories/GHSA-rq77-p4h8-4crw
web, advisory
-
lists.debian.org
/debian-lts-announce/2025/05/msg00002.html
web
-
nvd.nist.gov
/vuln/detail/CVE-2025-24358
advisory
-
github.com
/gorilla/csrf
package
-
pkg.go.dev
/vuln/GO-2025-3607
web
Sources
- CVE List CVE-2025-24358
- GitHub Advisory GHSA-rq77-p4h8-4crw
- NVD CVE-2025-24358
- OSV GO-2025-3607
Fencer Vulns keeps one entry per vulnerability: the CVE id wins, then GHSA, and records that alias each other are merged, except that two CVEs always keep separate entries. The same data is available as JSON.