Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2025-24358

MEDIUM 5.4EPSS 27%

gorilla/csrf CSRF vulnerability due to broken Referer validation

Also known as GHSA-rq77-p4h8-4crw, GO-2025-3607

Mitigation

  • Upgrade github.com/gorilla/csrf to 1.7.3 or later.

Who should check

  • Projects that depend on Go package github.com/gorilla/csrf (< 1.7.3)
  • Anyone running gorilla csrf < 1.7.3

Vulnerability facts

Affected
github.com/gorilla/csrf < 1.7.3
Fixed in
1.7.3
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Remote, no login needed
CVSS
5.4 (v4.0, CNA)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:POpen in CVSS calculator
Show all 12 CVSS metrics
  • Attack vector: Network
  • Attack complexity: Low
  • Attack requirements: Present
  • Privileges required: None
  • User interaction: Passive
  • Confidentiality impact: None
  • Integrity impact: High
  • Availability impact: None
  • Confidentiality impact on other systems: None
  • Integrity impact on other systems: None
  • Availability impact on other systems: None
  • Exploit maturity: Proof of concept
EPSS
0.41% chance of exploitation in 30 days (percentile 27, 2026-11-26)
CWE
CWE-352
Published
Modified

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.

Affected and fixed versions

Package / productAffectedFixedSource
Go github.com/gorilla/csrf< 1.7.31.7.3osv
gorilla csrf< 1.7.3—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2025-24358. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-24358.md
Affected: github.com/gorilla/csrf < 1.7.3
Fixed in: 1.7.3

Steps:
1. Search this machine and project for github.com/gorilla/csrf (Go), gorilla csrf: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.

References

FAQ

Is CVE-2025-24358 being exploited?

There is no confirmed exploitation: CVE-2025-24358 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.41% chance of exploitation in the next 30 days (as of 2026-11-26).

How serious is CVE-2025-24358?

Medium: CVSS 5.4 (v4.0, scored by CNA). Remote, no login needed. A user has to take an action, such as opening a link, for the attack to work.

Which versions are affected by CVE-2025-24358?

github.com/gorilla/csrf < 1.7.3.

Is there a fix for CVE-2025-24358?

Yes. Fixed in 1.7.3. Upgrade github.com/gorilla/csrf to 1.7.3 or later.

How do I check if I'm affected by CVE-2025-24358?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

Sponsors