VDB

CVE-2025-24358

CVE-2025-24358 PUBLISHED CVSS 5.4 MEDIUM

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.

PackageEcosystemFixed in
github.com/gorilla/csrfGo Modules1.7.3
harbor-fips-2.11Chainguard2.11.2-r12
harbor-2.12Wolfi2.12.2-r10
harbor-fips-2.14Chainguard2.14.0-r1
harbor-2.11Wolfi2.11.2-r8
harbor-2.11Chainguard2.11.2-r8
harbor-2.12Chainguard2.12.2-r10
harbor-fips-2.12Chainguard2.12.2-r11
harbor-2.10Chainguard2.10.3-r16
zitadel-3Chainguard3.4.5-r1
harbor-2.10Wolfi2.10.3-r16
tailscaleWolfi1.82.0-r42

6 more packages have a fixed version. See every fix in Lookup.

Risk scores

CVSS 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

Affected products

VendorProductVersions
gorillacsrf< 1.7.3
chainguardharbor-fips-2.110
wolfiharbor-2.120
chainguardharbor-fips-2.140
wolfiharbor-2.110
chainguardharbor-2.110
chainguardharbor-2.120
chainguardharbor-fips-2.120
chainguardharbor-2.100
chainguardzitadel-30
github.comgorilla/csrf0
wolfiharbor-2.100
wolfitailscale0
chainguardzitadel-40
chainguardharbor-2.140
chainguardtailscale0
wolfiharbor-2.140
chainguardharbor-fips-2.130
chainguardharbor-fips-2.100
gorillacsrf0

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

Look up in the Resolve Platform →
$ Lookup Community · 50/day Open Lookup ›