CVE-2025-24358gorilla csrf
Medium 5.4 No auth needed
Follow: this CVE · gorilla · gorilla csrf We alert you by email or Slack (account required).
- Priority
- 47
- CVSS 4.0
- 5.4
- EPSS
- —
- Auth required
- No
- Published
- Apr 15, 2025
- Updated
- Jun 17, 2026
- Category
- Application · Cross-platform
- Weakness (CWE)
- CWE-352
- SSVC (CISA)
- Exploitation: proof of concept · Automatable: no · Technical impact: partial
- Vector
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
What happens
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.
What to do
- Apply the vendor's security update for csrf.
- It can be exploited without authentication: if you cannot patch now, restrict Internet access to the affected service.
Affected packages
| Ecosystem | Package | Affected versions | Fixed in | How to upgrade |
|---|---|---|---|---|
| Go | github.com/gorilla/csrf |
< 1.7.3 |
1.7.3 |
go get github.com/gorilla/csrf@v1.7.3 |
| Go | github.com/gorilla/csrf |
< 1.7.3 |
1.7.3 |
go get github.com/gorilla/csrf@v1.7.3 |
Per OSV / GitHub Advisories (GHSA-rq77-p4h8-4crw, GO-2025-3607). Check the version in your lockfile before upgrading.
Affected products
- gorilla · csrf
As reported by the CNA that published the CVE. NVD has not added CPEs with versions yet.
Official advisories
- velociraptor-0.7.0.4.git185.a5708584-2.1 on GA media · SUSE · openSUSE-SU-2026:11126-1 · Jun 25, 2026 Critical
Vendor, CERT and distribution advisories that name this CVE. Original titles.
Official sources
References
Links published by the sources. Open them with care.