CVE-2025-24358
gorilla/csrf CSRF vulnerability due to broken Referer validation
Reported by github_m · Published April 15, 2025
github.com/gorilla/csrf is fixed in 1.7.3 (Go Modules)
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| github.com/gorilla/csrf | Go Modules | 1.7.3 |
| harbor-fips-2.11 | Chainguard | 2.11.2-r12 |
| harbor-2.12 | Wolfi | 2.12.2-r10 |
| harbor-fips-2.14 | Chainguard | 2.14.0-r1 |
| harbor-2.11 | Wolfi | 2.11.2-r8 |
| harbor-2.11 | Chainguard | 2.11.2-r8 |
| harbor-2.12 | Chainguard | 2.12.2-r10 |
| harbor-fips-2.12 | Chainguard | 2.12.2-r11 |
| harbor-2.10 | Chainguard | 2.10.3-r16 |
| zitadel-3 | Chainguard | 3.4.5-r1 |
| harbor-2.10 | Wolfi | 2.10.3-r16 |
| tailscale | Wolfi | 1.82.0-r42 |
6 more packages have a fixed version. See every fix in Lookup.
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| gorilla | csrf | < 1.7.3 |
| chainguard | harbor-fips-2.11 | 0 |
| wolfi | harbor-2.12 | 0 |
| chainguard | harbor-fips-2.14 | 0 |
| wolfi | harbor-2.11 | 0 |
| chainguard | harbor-2.11 | 0 |
| chainguard | harbor-2.12 | 0 |
| chainguard | harbor-fips-2.12 | 0 |
| chainguard | harbor-2.10 | 0 |
| chainguard | zitadel-3 | 0 |
| github.com | gorilla/csrf | 0 |
| wolfi | harbor-2.10 | 0 |
| wolfi | tailscale | 0 |
| chainguard | zitadel-4 | 0 |
| chainguard | harbor-2.14 | 0 |
| chainguard | tailscale | 0 |
| wolfi | harbor-2.14 | 0 |
| chainguard | harbor-fips-2.13 | 0 |
| chainguard | harbor-fips-2.10 | 0 |
| gorilla | csrf | 0 |
Timeline
- Apr 14, 2025 CVE Published
- Apr 16, 2025 EPSS Score (30 in total, the first dated here)
- May 1, 2025 CVE Updated
- May 13, 2025 Coalition ESS Score (16 in total, the first dated here)
- Dec 20, 2025 Security Advisory (2 in total, the first dated here)
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2025-24358
vulnetix vdb fixes CVE-2025-24358
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2025-24358/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart
References
- https://github.com/gorilla/csrf/security/advisories/GHSA-rq77-p4h8-4crw x_refsource_CONFIRM
- https://github.com/gorilla/csrf/commit/9dd6af1f6d30fc79fb0d972394deebdabad6b5eb x_refsource_MISC
- https://nvd.nist.gov/vuln/detail/CVE-2025-24358 advisory
- https://github.com/advisories/GHSA-rq77-p4h8-4crw advisory
- https://github.com/gorilla/csrf url
- https://pkg.go.dev/vuln/GO-2025-3607 url
- https://lists.debian.org/debian-lts-announce/2025/05/msg00002.html url