CVE-2025-24358: gorilla/csrf CSRF vulnerability due to broken Referer validation
Vulnerability summary
CVE-2025-24358 is a medium (CVSS 5.4) Cross-Site Request Forgery (CSRF) vulnerability in gorilla csrf. EPSS estimates a 0.37% chance of exploitation in the next 30 days, higher than 30.1% of scored vulnerabilities.
Advisory lineage
Upstream 0 · Downstream 2 · Related 10Timeline
- 15-04-2025PublishedVulnerability first disclosed.
- 01-05-2025Last modifiedVulnerability information updated.
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.
CVSS metrics
7 scores · 7 sources · 1 version- OSV · UbuntuEcosystem advisory · calculated6.0MediumCVSS: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:PDiffers
- OSV · DebianEcosystem advisory · calculated6.0MediumCVSS: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:XDiffers
- OSV · WolfiEcosystem advisory · calculated6.0MediumCVSS: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:PDiffers
- OSV · GoEcosystem advisory · calculated6.0MediumCVSS: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:PDiffers
- OSV · ChainguardEcosystem advisory · calculated6.0MediumCVSS: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:PDiffers
- NVDNIST5.4MediumCVSS: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
EPSS trend
Probability
0.37%
Chance of exploitation in the next 30 days
Percentile
30%
Versus all other CVEs
30-day change
Increase +0.01 pp
From 0.37% on 22-09-2026
Known exploited
Compare KEV catalogsNot in the CISA KEV catalog.
Not in the ENISA CNW catalog.
Not in the CIRCL catalog.
Public exploits
0 foundNo public exploits indexed.
Weaknesses
CWE · root causeAffected systems
Chainguard61 products
- harbor-2.11< 2.11.2-r8
- harbor-2.11-exporter< 2.11.2-r8
- harbor-2.11-jobservice< 2.11.2-r8
- harbor-2.11-photon-registry< 2.11.2-r8
- harbor-2.11-portal< 2.11.2-r8
Wolfi9 products
- harbor-2.14< 2.14.0-r1
- harbor-2.14-exporter< 2.14.0-r1
- harbor-2.14-jobservice< 2.14.0-r1
- harbor-2.14-portal< 2.14.0-r1
- harbor-2.14-portal-nginx-config< 2.14.0-r1
Debian1 product
- golang-github-gorilla-csrfAll versions (No fix recorded) | < 1.7.2+ds1-2 | < 1.6.2-2+deb11u1
Github.com/gorilla1 product
- csrf< 1.7.3
Gorilla1 product
- csrf< 1.7.3
Ubuntu1 product
- golang-github-gorilla-csrfAll versions (No fix recorded)
6 vendors · 74 products
References
10 links- github.com/gorilla/csrfPACKAGE