Read the docs
TI-2025-18101 Aliases CVE-2025-24358GHSA-rq77-p4h8-4crw

gorilla/csrf CSRF vulnerability due to broken Referer validation

Priority MEDIUM 58CWE-352Published · Updated

Key facts

Attack vector
Network
Privileges required
None
User interaction
Passive
Attack complexity
Low
Attack requirements
Present
Impact type
Tampering
Confidentiality · integrity · availability
None · High · None
Fix status
Fixed

Attack profile from CVSS 4.0 · CNA. Fix status from CNA and GitHub. Impact type from CWE-352.

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.

Why it matters now

Exploitation Proof of concept CISA SSVC · not in CISA KEV
EPSS 0.00374 31st percentileScored 2026-11-07
Fix Fixed csrf (gorilla): 1.7.3github.com/gorilla/csrf (Go): 1.7.3

SSVC decision points

CISA ADP · SSVC 2.0.3

Exploitation
Poc
Automatable
No
Technical impact
Partial

The decision (Track, Attend, Act) also depends on your mission and well-being impact; see CISA's SSVC guide.

Affected products

VendorProductAffected versionsFixed inStatusSource
gorillacsrfbefore 1.7.31.7.3Patch availableCNA
—github.com/gorilla/csrf (Go)before 1.7.31.7.3Patch availableGHSA-rq77-p4h8-4crw
  • csrf Vendorgorilla Affected before 1.7.3 Fixed in 1.7.3 Patch available CNA
  • github.com/gorilla/csrf (Go) Vendor— Affected before 1.7.3 Fixed in 1.7.3 Patch available GHSA-rq77-p4h8-4crw

Remediation

  • Fix · CNA csrf (gorilla) Fixed in 1.7.3
  • Fix · GHSA-rq77-p4h8-4crw github.com/gorilla/csrf (Go) Fixed in 1.7.3 Advisory →

Vendor assessments

Red Hat

Red Hat's page for this CVE →

Not affected: 1 product
  • Red Hat

Timeline

  1. 2026-10-02 Threatist record created from CVE-2025-24358
  2. 2026-10-03 Alias added: GHSA-rq77-p4h8-4crw

References

  • TI-2024-24810 Potential memory exhaustion attack due to sparse slice deserialization CVSS 3.1HIGH 7.5

Sources